Guest User

Untitled

a guest
Jul 19th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. if (playerCommand.startsWith("givemod")) {
  2. try {
  3. String playerToMod = playerCommand.substring(8);
  4. for (int i = 0; i < Config.MAX_PLAYERS; i++) {
  5. if (PlayerHandler.players[i] != null) {
  6. if (PlayerHandler.players[i].playerName
  7. .equalsIgnoreCase(playerToMod)) {
  8. Client c2 = (Client) PlayerHandler.players[i];
  9. c2.sendMessage("You have been given mod status by "
  10. + c.playerName);
  11. c2.playerRights = 1;
  12. c2.logout();
  13. break;
  14. }
  15. }
  16. }
  17. } catch (Exception e) {
  18. c.sendMessage("Player Must Be Offline.");
  19. }
  20. }
Add Comment
Please, Sign In to add comment