diff --git a/patches/server/Fix-PlayerBucketEmptyEvent-result-itemstack.patch b/patches/server/Fix-PlayerBucketEmptyEvent-result-itemstack.patch index 8a951512ef..538949bdf8 100644 --- a/patches/server/Fix-PlayerBucketEmptyEvent-result-itemstack.patch +++ b/patches/server/Fix-PlayerBucketEmptyEvent-result-itemstack.patch @@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public class BucketItem extends Item implements DispensibleContainerItem { -+ private static ItemStack itemLeftInHandAfterPlayerBucketEmptyEvent = null; // Paper ++ private static @Nullable ItemStack itemLeftInHandAfterPlayerBucketEmptyEvent = null; // Paper + public final Fluid content; @@ -36,9 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 ((ServerPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541 return false; } -+ // Paper start -+ itemLeftInHandAfterPlayerBucketEmptyEvent = event.getItemStack().equals(CraftItemStack.asNewCraftStack(net.minecraft.world.item.Items.BUCKET)) ? null : CraftItemStack.asNMSCopy(event.getItemStack()); -+ // Paper end ++ itemLeftInHandAfterPlayerBucketEmptyEvent = event.getItemStack() != null ? event.getItemStack().equals(CraftItemStack.asNewCraftStack(net.minecraft.world.item.Items.BUCKET)) ? null : CraftItemStack.asNMSCopy(event.getItemStack()) : ItemStack.EMPTY; // Paper - fix empty event result itemstack } // CraftBukkit end if (!flag1) {