SHARE
TWEET

invsee backup

a guest Nov 21st, 2019 98 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
  2.         if(sender instanceof Player){
  3.             Player player = (Player) sender;
  4.             if(player.hasPermission("EverydayBasics.invsee")){
  5.                 if(args.length!= 1){
  6.                     player.sendMessage("Please specify the player who's inventory you want to see!");
  7.                     return true;
  8.                 }
  9.                 Player target = Bukkit.getPlayer(args[0]);
  10.                 if(target == null){
  11.                     player.sendMessage("§4That player doesnt exist");
  12.                     return true;
  13.                 }
  14.                 player.openInventory(target.getInventory());
  15.                 String targetuuid = mysqlAccess.getUUIDfromName(args[0]);
  16.                 player.sendMessage(targetuuid);
  17.                 player.sendMessage(player.getUniqueId().toString());
  18.                 return true;
  19.             }
  20.             player.sendMessage(msg.permissionDenied);
  21.             return true;
  22.         }
  23.         sender.sendMessage(msg.senderNotPlayer);
  24.         return true;
  25.     }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top