SHARE
TWEET

Untitled

a guest Oct 15th, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     public static ArrayList<UUID> enderchest = new ArrayList<UUID>();
  2.     private static String playeroffline = Citybuild.prefix + "§cFehler der §bSpieler §cist offline!";
  3.  
  4.     @Override
  5.     public boolean onCommand(CommandSender cs, Command cmd, String label, String[] args) {
  6.         Player player = (Player) cs;
  7.  
  8.         if (player.hasPermission("Citybuild.ec")) {
  9.  
  10.             if (args.length == 0) {
  11.                 if (cmd.getName().equalsIgnoreCase("ec") || cmd.getName().equalsIgnoreCase("enderchest")) {
  12.                     player.sendMessage(Citybuild.prefix + "Du hast Erfolgreich deine §bEnderchest §7geöffnet.");
  13.                     player.openInventory(player.getEnderChest());
  14.                 }
  15.             } else if (args.length == 1) {
  16.                 if (player.hasPermission("Citybuild.ec.other")) {
  17.                     player.sendMessage(Citybuild.noperm);
  18.                     return true;
  19.  
  20.                     final Player target = Bukkit.getPlayer(args[0]);
  21.                     if (target == null) {
  22.                         player.sendMessage(playeroffline);
  23.                         return true;
  24.                     }
  25.                     player.openInventory(target.getEnderChest());
  26.                     Enderchest_cmd.enderchest.contains(player.getUniqueId());
  27.                 } else {
  28.                     player.sendMessage(Citybuild.noperm);
  29.                 }
  30.  
  31.             }
  32.             return false;
  33.         }
  34.         return false;
  35.     }
  36. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top