Solved Click event acting weird.

Discussion in 'Plugin Development' started by spurkle, Nov 15, 2014.

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


    Hey. I have 'default' items that player doesn't drop on death or can't put anywhere. BUT for some reason player can put the items in one of custom inventories & regular chests. Code to prevent putting looks like this:

            if (e.getInventory().getHolder() instanceof Player) {
                if (e.getSlot() == 8 || e.getSlot() == 7)
    Help would be much appreciated. thanks.

    EDIT: Nvm, thats me being dumb lol. Didn't notice 'get holder' statement.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 13, 2016
Thread Status:
Not open for further replies.

Share This Page