Exemplo n.º 1
0
 @Override
 public void setPlayerOnline(Player player) {
   if (!playerOnline) {
     try {
       owner = (CraftPlayer) player;
       InventoryEnderChest playerEnderChest = owner.getHandle().getEnderChest();
       Field field = playerEnderChest.getClass().getField("items");
       field.setAccessible(true);
       field.set(playerEnderChest, this.items);
     } catch (Exception e) {
     }
     playerOnline = true;
   }
 }
Exemplo n.º 2
0
 public SpecialEnderChest(Player p, Boolean online) {
   super(
       ((CraftPlayer) p).getHandle().getEnderChest().getInventoryName(),
       ((CraftPlayer) p).getHandle().getEnderChest().k_(),
       ((CraftPlayer) p).getHandle().getEnderChest().getSize());
   CraftPlayer player = (CraftPlayer) p;
   this.enderChest = player.getHandle().getEnderChest();
   this.owner = player;
   this.items = enderChest.getContents();
 }
Exemplo n.º 3
0
 @Override
 public void update() {
   super.update();
   enderChest.update();
 }