[SPIGOT-4541] Setting PlayerBucketEmptyEvent cancelled still empties the bucket, opening a block with inventory reverts bucket to pre-event ItemStack. Created: 19/Dec/18  Updated: 21/Dec/18  Resolved: 21/Dec/18

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Reg Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: PlayerBucketEmptyEvent
Environment:

Windows


Attachments: GIF File BucketEmpty.gif    
Version: 1.13.2
Guidelines Read: Yes

 Description   

Recreate:

Create a PlayerBucketEmptyEvent listener.  Set event.Cancelled(true).

 

What happens:

Bucket empties as normal and reverts to Material.BUCKET.

Open an inventory block (chest, furnace, crafting table etc.), bucket reverts to what it was before the event (Material.SALMON_BUCKET in my case).

 

I'm trying to access the ItemMeta on the original bucket and only cancel the event if the Meta matches a given criteria.  I can't get the ItemMeta until it reverts when I open an inventory block.


Generated at Sat Dec 13 13:41:24 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.