PlayerItemConsumeEvent Bug

Discussion in 'Plugin Development' started by ShakyTom, Sep 13, 2013.

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


    I am trying to cancel the consumption of golden apples but have encountered a very weird bug...

    My code is:

    @EventHandler(ignoreCancelled = true, priority = EventPriority.LOWEST)
        public void appleConsume(PlayerItemConsumeEvent event) {
            if(event.getItem().getType() == Material.GOLDEN_APPLE && event.getItem().getData().getData() == 1) {
    It cancels the event fine, but the client then thinks the helmet slot has been replaced by apples for some reason?!


    Is it something I am doing wrong, or a bug?

    Depending on what slot the apples are in when I eat them seems to change where they appear:


    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 4, 2016
  2. Offline


    This is a bug I believe, when I made a plugin for this it did the same thing.
Thread Status:
Not open for further replies.

Share This Page