How to get the open chest position ?

Discussion in 'Plugin Development' started by DevilDeath, Dec 16, 2016.

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

    DevilDeath

    Hello, how are you guys :) please can you help me to get coding for get the open chest position
    Like this :
    [​IMG]
    i need if player interact to ender chest get this position and after 1 min get close :D
    Thanks for all member and staff of bukkit
     
  2. Offline

    Lordloss

    The way you can do this is listen for the PlayerInteractEvent, and check if it is RIGHT_CLICK_BLOCK, then check if its an enderchest. But i dont really get the other stuff of your question...
     
  3. Offline

    DevilDeath

    @Lordloss Yes, I know this but i need if player RIGHT_CLICK_BLOCK and this block is enderchest get this position
    Another example:
    [​IMG]
     
  4. Offline

    sedridd

    I've taken a huge break from coding so I apologise if I screw up here but, you'd need to check if a player opens an enderchest. If they do, cancel the event (event.cancelEvent(); I think) and set the enderchest to an open position- this should be an item ID.
     
  5. Offline

    boomboompower

    Code:
    if block is an enderchest
    
    event.setCancelled(true);
    
    do magic things
     
Thread Status:
Not open for further replies.

Share This Page