Look likes chest goes open

Discussion in 'Spigot Plugin Help' started by JordyPwner, May 12, 2015.

  1. How can i make look like the chest goes open? Already tried:
    CraftPlayer p = (CraftPlayer) e.getPlayer();
    PacketPlayOutBlockAction packet = new PacketPlayOutBlockAction((int)e.getClickedBlock().getLocation().getX(),(int)e.getClickedBlock().getLocation().getY(),(int)e.getClickedBlock().getLocation().getZ(), Blocks.CHEST,1,1);
    p.getHandle().playerConnection.sendPacket(packet);

    But that isnt working ;3
     
  2. Nvm it does but now how do i close it?
     
  3. There are ways to do this but I believe this works the best, if someone is in the chest's inventory GUI screen then this code will close the chest and close the GUI for the player(s) in the chest.
    event.getDamageLevel().equals(BlockDamageLevel.STARTED)
    Let me know if this works!