How differentiate the chests ?

Discussion in 'Plugin Development' started by 4z3rty, Jun 14, 2012.

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

    4z3rty

    Hi,
    I have my Event : InventoryOpenEvent and I can't get the location of my Chest.
    How make ?

    Thank


    Escuse me for my spelling, I'm french !
     
  2. an invetory is not always an chest, mayby you can catch the playerinteract event for right clicking on chests
     
  3. Offline

    4z3rty

    Can we write that ? :
    Code:
    public void ouvreCoffre(InventoryOpenEvent e, PlayerInteractEvent e2){
    }
    I have found a solution :
    Code:
    @EventHandler(priority = EventPriority.LOW)
        public void clickDroit(PlayerInteractEvent e){
            
            Block b = e.getClickedBlock();
            if(b.getTypeId() == 54){
                chestShop = true;
            }
        }
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
Thread Status:
Not open for further replies.

Share This Page