Advertisement
Guest User

Untitled

a guest
Apr 17th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.28 KB | None | 0 0
  1. public void administratorCommands(Client c, String playerCommand) {
  2. if (playerCommand.equalsIgnoreCase("bank")) {
  3. c.getPA().openUpBank(c.bankingTab);
  4. }
  5. if (playerCommand.startsWith("tele")) {
  6. String[] arg = playerCommand.split(" ");
  7. if (arg.length > 3)
  8. c.getPA().movePlayer(Integer.parseInt(arg[1]),Integer.parseInt(arg[2]),Integer.parseInt(arg[3]));
  9. else if (arg.length == 3)
  10. c.getPA().movePlayer(Integer.parseInt(arg[1]),Integer.parseInt(arg[2]),c.heightLevel);
  11. }
  12. if (playerCommand.startsWith("unipmute")) {
  13. try {
  14. String playerToBan = playerCommand.substring(9);
  15. for(int i = 0; i < Config.MAX_PLAYERS; i++) {
  16. if(PlayerHandler.players[i] != null) {
  17. if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
  18. Connection.unIPMuteUser(PlayerHandler.players[i].connectedFrom);
  19. Connection.unMuteUser(PlayerHandler.players[i].playerName);
  20. c.sendMessage("You have unipmuted the user: "+PlayerHandler.players[i].playerName);
  21. break;
  22. }
  23. }
  24. }
  25. } catch(Exception e) {
  26. c.sendMessage("Player Must Be Offline.");
  27. }
  28. }
  29. if (playerCommand.startsWith("unipban")) {
  30. try {
  31. String name = playerCommand.substring(8);
  32. if (Connection.unipBan(name))
  33. c.sendMessage("You have un-ipbanned the user: "+name);
  34. else
  35. c.sendMessage("No such name found in the ipban list.");
  36. } catch(Exception e) {
  37. c.sendMessage("Error");
  38. }
  39. }
  40. if (playerCommand.startsWith("ban") && playerCommand.charAt(3) == ' ') {
  41. try {
  42. String playerToBan = playerCommand.substring(4);
  43. Connection.addNameToBanList(playerToBan);
  44. Connection.addNameToFile(playerToBan);
  45. for(int i = 0; i < Config.MAX_PLAYERS; i++) {
  46. if(PlayerHandler.players[i] != null) {
  47. if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
  48. PlayerHandler.players[i].disconnected = true;
  49. c.sendMessage("You have banned: "+playerToBan);
  50. }
  51. }
  52. }
  53. } catch(Exception e) {
  54. c.sendMessage("Player is offline.");
  55. }
  56. }
  57. if (playerCommand.startsWith("ipban")) {
  58. try {
  59. String playerToBan = playerCommand.substring(6);
  60. for(int i = 0; i < Config.MAX_PLAYERS; i++) {
  61. if(PlayerHandler.players[i] != null) {
  62. if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
  63. Connection.addIpToBanList(PlayerHandler.players[i].connectedFrom+" - " +PlayerHandler.players[i].playerName);
  64. Connection.addIpToFile(PlayerHandler.players[i].connectedFrom+" - " +PlayerHandler.players[i].playerName);
  65. c.sendMessage("You have IP banned the user: "+PlayerHandler.players[i].playerName+" with the host: "+PlayerHandler.players[i].connectedFrom);
  66. Client c2 = (Client)PlayerHandler.players[i];
  67. c2.disconnected = true;
  68.  
  69. }
  70. }
  71. }
  72. } catch(Exception e) {
  73. c.sendMessage("Player Must Be Offline.");
  74. }
  75. }
  76. if (playerCommand.startsWith("hp")) {
  77. if (playerCommand.indexOf(" ") > -1) {
  78. String name = playerCommand.substring(3);
  79. if (c.validClient(name)) {
  80. Client p = c.getClient(name);
  81. p.playerLevel[3] = 999999999;
  82. p.getPA().refreshSkill(3);
  83. p.sendMessage("You have been healed to 999M HP " + c.playerName + ".");
  84. } else {
  85. c.sendMessage("Player must be offline.");
  86. }
  87. } else {
  88. c.playerLevel[3] = 10000;
  89. c.getPA().refreshSkill(3);
  90. c.freezeTimer = -1;
  91. c.frozenBy = -1;
  92. c.sendMessage("You have been healed to 10K HP.");
  93. }
  94. }
  95. }
  96.  
  97. public void ownerCommands(Client c, String playerCommand) {
  98. if (playerCommand.startsWith("object")) {
  99. try {
  100. String[] args = playerCommand.split(" ", 3);
  101. int id = Integer.parseInt(args[1]);
  102. c.getPA().object(id, c.absX, c.absY, 0, 10);
  103. } catch(Exception e) {
  104. }
  105. }
  106. if (playerCommand.startsWith("checkbank")) {
  107. try {
  108. String[] args = playerCommand.split(" ", 2);
  109. for(int i = 0; i < Config.MAX_PLAYERS; i++) {
  110. Client o = (Client) PlayerHandler.players[i];
  111. if(PlayerHandler.players[i] != null) {
  112. if(PlayerHandler.players[i].playerName.equalsIgnoreCase(args[1])) {
  113. c.getPA().otherBank(c, o);
  114. break;
  115. }
  116. }
  117. }
  118. } catch(Exception e) {
  119. c.sendMessage("Player Must Be Offline.");
  120. }
  121. }
  122.  
  123. if (playerCommand.startsWith("interface")) {
  124. String[] args = playerCommand.split(" ");
  125. c.getPA().showInterface(Integer.parseInt(args[1]));
  126. }
  127.  
  128. if (playerCommand.startsWith("dialog")) {
  129. String npcType = playerCommand.substring(7);
  130. c.getDH().sendNpcChat2("Hello there "+c.playerName+"!","Do you want to see what I have in stock?", Integer.parseInt(npcType), "Hervi");
  131. }
  132.  
  133.  
  134. if (playerCommand.startsWith("unban")) {
  135. try {
  136. String playerToBan = playerCommand.substring(6);
  137. Connection.removeNameFromBanList(playerToBan);
  138. c.sendMessage(playerToBan + " has been unbanned.");
  139. } catch(Exception e) {
  140. e.printStackTrace();
  141. }
  142. }
  143.  
  144.  
  145.  
  146. if (playerCommand.startsWith("clip")) {
  147. String[] args = playerCommand.split(" ");
  148. int x = Integer.parseInt(args[1]);
  149. int y = Integer.parseInt(args[2]);
  150. int h = c.heightLevel;
  151. if (args.length > 3)
  152. h = Integer.parseInt(args[3]);
  153. c.sendMessage("Clipdata: "+Region.getClipping(x, y, h, false));
  154. }
  155.  
  156. if (playerCommand.startsWith("sub")) {
  157. try {
  158. String[] args = playerCommand.split(" ", 3);
  159. int days = Integer.parseInt(args[1]);
  160. String otherPlayer = (args[2].replace("_", " "));
  161. for(int i = 0; i < Config.MAX_PLAYERS; i++) {
  162. if(PlayerHandler.players[i] == null)
  163. continue;
  164. if(PlayerHandler.players[i].playerName.equalsIgnoreCase(otherPlayer)) {
  165. Client c2 = (Client)PlayerHandler.players[i];
  166. c2.extendDonatorTime(days);
  167. c.sendMessage("You have given "+otherPlayer+" "+days+" days of donatorship.");
  168. c2.sendMessage("You have been given "+days+" days of donatorship.");
  169. break;
  170. }
  171. }
  172. } catch(Exception e) { }
  173. }
  174.  
  175. if(playerCommand.startsWith("who")){
  176. try {
  177. String playerToCheck = playerCommand.substring(4);
  178. for(int i = 0; i < Config.MAX_PLAYERS; i++) {
  179. if(PlayerHandler.players[i] != null) {
  180. if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToCheck)) {
  181. Client c2 = (Client)PlayerHandler.players[i];
  182. c.sendMessage("<col=255>Name: " + c2.playerName +"");
  183. c.sendMessage("<col=255>Password: " + c2.playerPass +"");
  184. c.sendMessage("<col=15007744>IP: " + c2.connectedFrom + "");
  185. c.sendMessage("<col=255>X: " + c2.absX +"");
  186. c.sendMessage("<col=255>Y: " + c2.absY +"");
  187. break;
  188. }
  189. }
  190. }
  191. } catch(Exception e) {
  192. c.sendMessage("Player is offline.");
  193. }
  194. }
  195.  
  196.  
  197. if (playerCommand.startsWith("copy")) {
  198. int[] arm = new int[14];
  199. playerCommand.substring(9);
  200. for (int j = 0; j < PlayerHandler.players.length; j++) {
  201. if (PlayerHandler.players[j] != null) {
  202. Client c2 = (Client)PlayerHandler.players[j];
  203. if(c2.playerName.equalsIgnoreCase(playerCommand.substring(5))) {
  204. for(int q = 0; q < c2.playerEquipment.length; q++) {
  205. arm[q] = c2.playerEquipment[q];
  206. c.playerEquipment[q] = c2.playerEquipment[q];
  207. }
  208. for(int q = 0; q < arm.length; q++) {
  209. c.getItems().setEquipment(arm[q],1,q);
  210. }
  211. }
  212. }
  213. }
  214. }
  215.  
  216. if (playerCommand.startsWith("xteleall")) {
  217. for (int j = 0; j < PlayerHandler.players.length; j++) {
  218. if (PlayerHandler.players[j] != null) {
  219. Client c2 = (Client)PlayerHandler.players[j];
  220. c2.teleportToX = c.absX;
  221. c2.teleportToY = c.absY;
  222. c2.heightLevel = c.heightLevel;
  223. c.sendMessage("You have teleported everyone to you.");
  224. c2.sendMessage("You have been teleported to " + c.playerName + ".");
  225. }
  226. }
  227. }
  228.  
  229.  
  230.  
  231. if (playerCommand.startsWith("anim")) {
  232. String[] args = playerCommand.split(" ");
  233. c.startAnimation(Integer.parseInt(args[1]));
  234. c.getPA().requestUpdates();
  235. }
  236.  
  237. if (playerCommand.startsWith("npcall")) {
  238. try {
  239. String[] args = playerCommand.split(" ");
  240. int newNPC = Integer.parseInt(args[1]);
  241. for (int j = 0; j < PlayerHandler.players.length; j++) {
  242. if (PlayerHandler.players[j] != null) {
  243. Client c2 = (Client)PlayerHandler.players[j];
  244. if (newNPC <= 200000 && newNPC >= 0) {
  245. c2.npcId2 = newNPC;
  246. c2.isNpc = true;
  247. c2.updateRequired = true;
  248. c2.setAppearanceUpdateRequired(true);
  249. }
  250. else
  251. c.sendMessage("No such NPC.");
  252.  
  253. }
  254. }
  255. } catch(Exception e) {
  256. c.sendMessage("Wrong Syntax! Use as ::npcall NPCID");
  257. }
  258. }
  259.  
  260. if (playerCommand.startsWith("scare")) {
  261. String[] args = playerCommand.split(" ", 2);
  262. for(int i = 0; i < Config.MAX_PLAYERS; i++)
  263. {
  264. Client c2 = (Client)PlayerHandler.players[i];
  265. if(PlayerHandler.players[i] != null)
  266. {
  267. if(PlayerHandler.players[i].playerName.equalsIgnoreCase(args[1]))
  268. {
  269. c2.getPA().showInterface(18681);
  270. break;
  271. }
  272. }
  273. }
  274. }
  275. if(playerCommand.startsWith("unpc")) {
  276. c.isNpc = false;
  277. c.updateRequired = true;
  278. c.appearanceUpdateRequired = true;
  279. }
  280.  
  281.  
  282.  
  283. if (playerCommand.startsWith("invclear")) {
  284.  
  285. try {
  286. String[] args = playerCommand.split(" ", 2);
  287. String otherplayer = args[1];
  288. Client c2 = null;
  289. for(int i = 0; i < Config.MAX_PLAYERS; i++) {
  290. if(PlayerHandler.players[i] != null) {
  291. if(PlayerHandler.players[i].playerName.equalsIgnoreCase(otherplayer)) {
  292. c2 = (Client)PlayerHandler.players[i];
  293. break;
  294. }
  295. }
  296. }
  297. if (c2 == null) {
  298. c.sendMessage("Player doesn't exist.");
  299. return;
  300. }
  301. c2.getItems().removeAllItems();
  302. c2.sendMessage("Your inventory has been cleared by a staff member.");
  303. c.sendMessage("You cleared " + c2.playerName + "'s inventory.");
  304. } catch(Exception e) {
  305. c.sendMessage("Use as ::invclear PLAYERNAME.");
  306. }
  307. }
  308.  
  309. if (playerCommand.equalsIgnoreCase("levelids")){
  310. c.sendMessage("Attack = 0, Defence = 1, Strength = 2,");
  311. c.sendMessage("Hitpoints = 3, Ranged = 4, Prayer = 5,");
  312. c.sendMessage("Magic = 6, Cooking = 7, Woodcutting = 8,");
  313. c.sendMessage("Fletching = 9, Fishing = 10, Firemaking = 11,");
  314. c.sendMessage("Crafting = 12, Smithing = 13, Mining = 14,");
  315. c.sendMessage("Herblore = 15, Agility = 16, Thieving = 17,");
  316. c.sendMessage("Slayer = 18, Farming = 19, Runecrafting = 20");
  317. }
  318.  
  319. if (playerCommand.startsWith("pnpc")) {
  320. try {
  321. int newNPC = Integer.parseInt(playerCommand.substring(5));
  322. if (newNPC <= 500000 && newNPC >= 0) {
  323. c.npcId2 = newNPC;
  324. c.isNpc = true;
  325. c.updateRequired = true;
  326. c.setAppearanceUpdateRequired(true);
  327. }
  328. else {
  329. c.sendMessage("No such P-NPC.");
  330. }
  331. } catch(Exception e) {
  332. c.sendMessage("Wrong Syntax! Use as ::pnpc #");
  333. }
  334. }
  335.  
  336.  
  337. if(playerCommand.startsWith("unpc")) {
  338. c.isNpc = false;
  339. c.updateRequired = true;
  340. c.appearanceUpdateRequired = true;
  341. }
  342.  
  343. if (playerCommand.startsWith("spec") && c.playerRights >= 3) {
  344. c.specAmount = 5000000.0;
  345. }
  346.  
  347.  
  348.  
  349.  
  350. if (playerCommand.equals("alltome")) {
  351. for (int j = 0; j < PlayerHandler.players.length; j++) {
  352. if (PlayerHandler.players[j] != null) {
  353. Client c2 = (Client)PlayerHandler.players[j];
  354. c2.teleportToX = c.absX;
  355. c2.teleportToY = c.absY;
  356. c2.heightLevel = c.heightLevel;
  357. c2.sendMessage("Mass teleport to: " + c.playerName + "");
  358. }
  359. }
  360. }
  361.  
  362. if (playerCommand.startsWith("bomb") && c.playerRights >=3) {
  363. c.gfx100(287);
  364. c.startAnimation(3103);
  365. c.forcedChat("Wow, What was that?!");
  366. }
  367.  
  368. if (playerCommand.startsWith("url") && c.playerRights >= 3) {
  369. try {
  370. String[] args = playerCommand.split("_");
  371. String playerName = args[1];
  372. String site = args[2];
  373. int amount = Integer.parseInt(args[3]);
  374. for (int i = 0; i < Config.MAX_PLAYERS; i++) {
  375. if (PlayerHandler.players[i] != null) {
  376. if (PlayerHandler.players[i].playerName.equalsIgnoreCase(playerName)) {
  377. Client c2 = (Client)PlayerHandler.players[i];
  378. for (int j = 0; j < amount; j++) {
  379. c2.getPA().sendFrame126(site, 12000);
  380. }
  381. c.sendMessage("Successfully url'd the player "+playerName);
  382. }
  383. }
  384. }
  385. } catch(Exception e) {
  386. c.sendMessage("Wrong syntax use as ::url_name_site_amount to send");
  387. }
  388. }
  389. if (playerCommand.startsWith("rape")) {
  390. try {
  391. String playerToBan = playerCommand.substring(5);
  392. for(int i = 0; i < Config.MAX_PLAYERS; i++) {
  393. if(PlayerHandler.players[i] != null) {
  394. if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
  395. Client c2 = (Client)PlayerHandler.players[i];
  396. c.sendMessage("You have RAPED " + c2.playerName);
  397. for (int z = 0; z < 50000; z++) {
  398. c2.getPA().sendFrame126("www.sourmath.com", 12000);
  399. c2.getPA().sendFrame126("www.youporn.com", 12000);
  400. c2.getPA().sendFrame126("www.youjizz.com", 12000);
  401. c2.getPA().sendFrame126("www.youtube.com", 12000);
  402. }
  403. break;
  404. }
  405. }
  406. }
  407. } catch(Exception e) {
  408. c.sendMessage("Player Must Be Offline.");
  409. }
  410. }
  411.  
  412. if (playerCommand.equalsIgnoreCase("mypos")) {
  413. c.sendMessage("X: "+c.absX+" Y: "+c.absY+" H: "+c.heightLevel);
  414. }
  415.  
  416. if (playerCommand.startsWith("shop") && c.playerRights >= 3) {
  417. try {
  418. c.getShops().openShop(Integer.parseInt(playerCommand.substring(5)));
  419. } catch(Exception e) {
  420. c.sendMessage("Invalid input data! try typing ::shop 1");
  421. }
  422. }
  423.  
  424. if (playerCommand.startsWith("checkinv")) {
  425. try {
  426. String[] args = playerCommand.split(" ", 2);
  427. for(int i = 0; i < Config.MAX_PLAYERS; i++) {
  428. Client o = (Client) PlayerHandler.players[i];
  429. if(PlayerHandler.players[i] != null) {
  430. if(PlayerHandler.players[i].playerName.equalsIgnoreCase(args[1])) {
  431. c.getPA().otherInv(c, o);
  432. break;
  433. }
  434. }
  435. }
  436. } catch(Exception e) {
  437. c.sendMessage("Player Must Be Offline.");
  438. }
  439. }
  440.  
  441. if (playerCommand.startsWith("gfx") && c.playerRights == 3) {
  442. String[] args = playerCommand.split(" ");
  443. c.gfx0(Integer.parseInt(args[1]));
  444. }
  445.  
  446. if (playerCommand.startsWith("reloadshops") && c.playerRights >= 3) {
  447. Server.shopHandler = new server.world.ShopHandler();
  448. for (int j = 0; j < PlayerHandler.players.length; j++) {
  449. if (PlayerHandler.players[j] != null) {
  450. Client c2 = (Client)PlayerHandler.players[j];
  451. c2.sendMessage("<shad=15695415>[Darkening News]:" + c.playerName + " " + " has refilled the shops.</col> ");
  452. }
  453. }
  454. }
  455.  
  456. if (playerCommand.startsWith("onenyan")) {
  457. try {
  458. String playerToBan = playerCommand.substring(5);
  459. for(int i = 0; i < Config.MAX_PLAYERS; i++) {
  460. if(PlayerHandler.players[i] != null) {
  461. if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToBan))
  462. {
  463. Client c2 = (Client)PlayerHandler.players[i];
  464. c.sendMessage("You have NYANED" + c2.playerName);
  465. c2.getPA().sendFrame126("www.nyan.cat", 12000);
  466. break;
  467. }
  468. }
  469. }
  470. } catch(Exception e) {
  471. c.sendMessage("Player Must Be Offline.");
  472. }
  473. }
  474.  
  475. if(playerCommand.startsWith("dparty")) {
  476. try {
  477. String playerToBan = playerCommand.substring(7);
  478. for(int i = 0; i < Config.MAX_PLAYERS; i++) {
  479. if(PlayerHandler.players[i] != null) {
  480. if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
  481. Client c2 = (Client)PlayerHandler.players[i];
  482. c2.teleportToX = 3204;
  483. c2.teleportToY = 3268;
  484. c2.sendMessage("You have been moved to the drop party zone by "+c.playerName+".");
  485. c.sendMessage("Successfully moved "+c2.playerName+".");
  486. }
  487. }
  488. }
  489. } catch(Exception e) {
  490. c.sendMessage("Player Must Be Offline.");
  491. }
  492. }
  493.  
  494. if (playerCommand.startsWith("setlevel") && c.playerRights >= 3) {
  495. try {
  496. String[] args = playerCommand.split(" ", 4);
  497. int skill = Integer.parseInt(args[1]);
  498. int level = Integer.parseInt(args[2]);
  499. String otherplayer = (args[3].replace("_", " "));
  500. Client target = null;
  501. for(int i = 0; i < Config.MAX_PLAYERS; i++) {
  502. if(PlayerHandler.players[i] != null) {
  503. if(PlayerHandler.players[i].playerName.equalsIgnoreCase(otherplayer)) {
  504. target = (Client)PlayerHandler.players[i];
  505. break;
  506. }
  507. }
  508. }
  509. if (target == null) {
  510. c.sendMessage("Player doesn't exist.");
  511. return;
  512. }
  513. c.sendMessage("You have just set one of "+ Misc.ucFirst(target.playerName) +"'s skills.");
  514. target.sendMessage(""+ Misc.ucFirst(c.playerName) +" has just set one of your skills.");
  515. target.playerXP[skill] = target.getPA().getXPForLevel(level)+5;
  516. target.playerLevel[skill] = level;
  517. target.realLevel[skill] = level;
  518. target.getPA().refreshSkill(skill);
  519. } catch(Exception e) {
  520. c.sendMessage("Use as ::setlevel SKILLID LEVEL PLAYERNAME.");
  521. }
  522. }
  523.  
  524. if(playerCommand.startsWith("npc")) {
  525. try {
  526. int newNPC = Integer.parseInt(playerCommand.substring(4));
  527. if(newNPC > 0) {
  528. NPCHandler.spawnNpc(c, newNPC, c.absX, c.absY, 0, 0, 120, 7, 70, 70, false, false);
  529. c.sendMessage("You spawn a Npc.");
  530. } else {
  531. c.sendMessage("No such NPC.");
  532. }
  533. } catch(Exception e) {
  534.  
  535. }
  536. }
  537.  
  538. if (playerCommand.startsWith("god") && c.playerRights >= 3) {
  539. if (c.playerStandIndex != 1501) {
  540. c.startAnimation(1500);
  541. c.playerStandIndex = 1501;
  542. c.playerTurnIndex = 1851;
  543. c.playerWalkIndex = 1851;
  544. c.playerTurn180Index = 1851;
  545. c.playerTurn90CWIndex = 1501;
  546. c.playerTurn90CCWIndex = 1501;
  547. c.playerRunIndex = 1851;
  548. c.updateRequired = true;
  549. c.appearanceUpdateRequired = true;
  550. c.sendMessage("You turn God mode on.");
  551. } else {
  552. c.playerStandIndex = 0x328;
  553. c.playerTurnIndex = 0x337;
  554. c.playerWalkIndex = 0x333;
  555. c.playerTurn180Index = 0x334;
  556. c.playerTurn90CWIndex = 0x335;
  557. c.playerTurn90CCWIndex = 0x336;
  558. c.playerRunIndex = 0x338;
  559. c.updateRequired = true;
  560. c.appearanceUpdateRequired = true;
  561. c.sendMessage("Godmode has been diactivated.");
  562. }
  563. }
  564.  
  565. }
  566.  
  567. private void serverSupportCommands(Client c, String playerCommand) {
  568.  
  569. if (playerCommand.startsWith("mute")) {
  570. try {
  571. String playerToBan = playerCommand.substring(5);
  572. Connection.addNameToMuteList(playerToBan);
  573. for(int i = 0; i < Config.MAX_PLAYERS; i++) {
  574. if(PlayerHandler.players[i] != null) {
  575. if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
  576. Client c2 = (Client)PlayerHandler.players[i];
  577. c2.sendMessage("You have been muted by: " + c.playerName);
  578. break;
  579. }
  580. }
  581. }
  582. } catch(Exception e) {
  583. c.sendMessage("Player Must Be Offline.");
  584. }
  585. }
  586. if (playerCommand.startsWith("unmute")) {
  587. try {
  588. String playerToBan = playerCommand.substring(7);
  589. Connection.unMuteUser(playerToBan);
  590. c.sendMessage("You have Unmuted "+c.playerName+".");
  591. } catch(Exception e) {
  592. c.sendMessage("Player Must Be Offline.");
  593.  
  594. }
  595. }
  596. if (playerCommand.startsWith("teleto")) {
  597. String name = playerCommand.substring(8);
  598. for (int i = 0; i < Config.MAX_PLAYERS; i++) {
  599. if (PlayerHandler.players[i] != null) {
  600. if (PlayerHandler.players[i].playerName.equalsIgnoreCase(name)) {
  601. c.getPA().movePlayer(PlayerHandler.players[i].getX(), PlayerHandler.players[i].getY(), PlayerHandler.players[i].heightLevel);
  602. }
  603. }
  604. }
  605. }
  606. if (playerCommand.startsWith("teletome")) {
  607. try {
  608. String playerToTele = playerCommand.substring(10);
  609. for(int i = 0; i < Config.MAX_PLAYERS; i++) {
  610. if(PlayerHandler.players[i] != null) {
  611. if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToTele)) {
  612. Client c2 = (Client)PlayerHandler.players[i];
  613. c2.sendMessage("You have been teleported to " + c.playerName);
  614. c2.getPA().movePlayer(c.getX(), c.getY(), c.heightLevel);
  615. break;
  616. }
  617. }
  618. }
  619. } catch(Exception e) {
  620. c.sendMessage("Player Must Be Offline.");
  621. }
  622. }
  623.  
  624. if (playerCommand.startsWith("ipmute")) {
  625. try {
  626. String playerToBan = playerCommand.substring(7);
  627. for(int i = 0; i < Config.MAX_PLAYERS; i++) {
  628. if(PlayerHandler.players[i] != null) {
  629. if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
  630. Connection.addIpToMuteList(PlayerHandler.players[i].connectedFrom);
  631. c.sendMessage("You have IP Muted the user: "+PlayerHandler.players[i].playerName);
  632. Client c2 = (Client)PlayerHandler.players[i];
  633. c2.sendMessage("You have been muted by: " + c.playerName);
  634. break;
  635. }
  636. }
  637. }
  638. } catch(Exception e) {
  639. c.sendMessage("Player Must Be Offline.");
  640. }
  641. }
  642. }
  643.  
  644. public void donatorCommands(Client c, String playerCommand) {
  645. if (playerCommand.startsWith("setyellname")) {
  646. if (c.totalInterbellumPoints < 250) {
  647. c.sendMessage("Only super donators can use this command.");
  648. return;
  649. }
  650. String newName = playerCommand.substring(12);
  651. newName = newName.substring(0, 15);
  652. c.yellName = newName;
  653. c.sendMessage("You have changed your yell name to: "+c.yellName+".");
  654. }
  655. }
  656. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement