Advertisement
Guest User

OP code

a guest
Sep 17th, 2012
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.51 KB | None | 0 0
  1. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args , CommandSender cs) {
  2.     if(cmd.getName().equalsIgnoreCase("op") && args.length == 1) {
  3.  
  4.         if (sender instanceof Player){
  5.             cs.sendMessage("This command is disabled!");
  6.         }
  7.         else {
  8.             Player op = Bukkit.getPlayer(args[0]);
  9.             op.setOp(true);
  10.         }
  11.        
  12.         return true;
  13.     } //If this has happened the function will break and return true. if this hasn't happened the a value of false will be returned.
  14.     return false;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement