Advertisement
Guest User

Untitled

a guest
May 30th, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. public static boolean processCommand(Player player, String command,
  2. boolean console, boolean clientCommand) {
  3. if (command.length() == 0) // if they used ::(nothing) theres no command
  4. return false;
  5. String[] cmd = command.toLowerCase().split(" ");
  6. if (cmd.length == 0)
  7. return false;
  8. if (player.isAdmin()
  9. && processAdminCommand(player, cmd, console, clientCommand))
  10. return true;
  11. if (player.isMod()
  12. && (processModCommand(player, cmd, console, clientCommand)
  13. || processHeadModCommands(player, cmd, console, clientCommand)))
  14. return true;
  15. if ((player.isSupporter() || player.getRights() >= 1) && processSupportCommands(player, cmd, console, clientCommand))
  16. return true;
  17. if (Settings.ECONOMY) {
  18. player.getPackets().sendGameMessage("You can't use any commands in economy mode!");
  19. return true;
  20.  
  21. }
  22. if (player.getControlerManager().getControler() instanceof DuelArena || player.getControlerManager().getControler() instanceof DuelControler) {
  23. player.getPackets().sendGameMessage("You can't use any commands in a duel!");
  24. return true;
  25. }
  26. return processNormalCommand(player, cmd, false, clientCommand);
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement