PlayerBucketEmptyEvent's setItemStack() method has no effect

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor
    • None
    • Affects Version/s: None

      If you listen to a bucket event and try to set the resulting item stack in the player's hand, there is no effect. It will update the ItemStack at the API level, meaning you can retrieve the new ItemStack with getItemStack(), but the actual in-game item will not be changed. They will always receive an empty bucket.

      The resulting event handler illustrates this behavior on the latest Spigot version:

      @EventHandler
      public void onPlayerBucketEmpty(PlayerBucketEmptyEvent event) {
          event.setItemStack(new ItemStack(Material.DIRT, 1));  
      }
      

            Assignee:
            Unassigned
            Reporter:
            redwall_hp
            Votes:
            5 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: