How to close the lit on chests?

Discussion in 'Plugin Development' started by Gabriel333, Dec 31, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Gabriel333

    Very often (but not always) the lit stays open when a user opens a chest locked with my BITDigiLock. Can anyone tell me how to close the lit again?
     
  2. if a player clicks the chest 2 times, before the screen from the chest comes up, then it wil stay open, can you check if this is not the case?
     
  3. Assuming you build towards CB, I think you can use this method: *Untested*
    https://github.com/Bukkit/CraftBukk...et/minecraft/server/TileEntityChest.java#L174
    Call it like
    Code:java
    1.  
    2. Block block = event.getBlock();
    3. if (block.getType().equals(Material.CHEST)) {
    4. Chest c = (Chest) block.getState();
    5. TileEntityChest tec = (((CraftChest) c).getHandle(); // You might have to cast to TileEntityChest here too
    6. tec.l_();
    7. }
    8.  
     
Thread Status:
Not open for further replies.

Share This Page