Advertisement
maxthelinkfan

Untitled

Dec 1st, 2013
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.12 KB | None | 0 0
  1. public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
  2.         if(cmd.getName().equalsIgnoreCase("givedonor")) {
  3.             Player p = (Player) sender;
  4.             Player t = Bukkit.getServer().getPlayer(args[0]);
  5.             if(args.length <= 0) {
  6.                 p.sendMessage(ChatColor.RED + "Invalid arguements!");
  7.                 return true;
  8.             }
  9.             if(args.length > 0) {
  10.                 if(t == null) {
  11.                         p.sendMessage(ChatColor.RED + "That player is offline!");
  12.                         return true;
  13.                     }
  14.                 else if (args.length > 0) {
  15.                     if(args[1].equalsIgnoreCase("VIP")) {
  16.                     if(p.hasPermission("brawl.givedonor")) {
  17.                         // give donor items
  18.                         return true;
  19.                     }
  20.                     else if (args.length > 0)
  21.                         if(args[1].equalsIgnoreCase("Sponsor")) {
  22.                             if(p.hasPermission("brawl.givedonor")) {
  23.                                 //give donor items
  24.                                 return true;
  25.                                
  26.                             }
  27.                             else if (args.length > 0) {
  28.                                 if(args[1].equalsIgnoreCase("Elite")) {
  29.                                     if(p.hasPermission("brawl.givedonor")) {
  30.                                         //give donor items
  31.                                         return true;
  32.                                     }
  33.                                     else if (args.length > 0) {
  34.                                         if(args[1].equalsIgnoreCase("Legend")) {
  35.                                             if(p.hasPermission("brawl.givedonor")) {
  36.                                                 return true;
  37.                                             }
  38.                                             else if (args.length > 0) {
  39.                                                 if(args[1].equalsIgnoreCase("Sonic")) {
  40.                                                     if(p.hasPermission("brawl.givedonor")) {
  41.                                                         //give donor items
  42.                                                         return true;
  43.                                                     }
  44.                                                     else if (args.length > 0){
  45.                                                         if(args[1].equalsIgnoreCase("King")) {
  46.                                                             if(p.hasPermission("brawl.givedonor")) {
  47.                                                                 //give donor items
  48.                                                                 return true;
  49.                                                             }
  50.                                                             else if (args.length > 0) {
  51.                                                                 if(args[1].equalsIgnoreCase("Master")) {
  52.                                                                     if(p.hasPermission("brawl.givedonor")) {
  53.                                                                         //give donor items
  54.                                                                         return true;
  55.                                                                     }
  56.                                                                 }
  57.                                                             }
  58.                                                         }
  59.                                                     }
  60.                                                 }
  61.                                             }
  62.                                         }
  63.                                     }
  64.                                 }
  65.                             }
  66.                         }
  67.                 }
  68.                 }
  69.             }
  70.     }
  71.         return false;
  72.  
  73. }
  74. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement