#1107: Add getHand() to all relevant events

By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
CraftBukkit/Spigot
2022-10-02 09:07:14 +11:00
parent 34ab403aa0
commit 159ae52462
17 changed files with 145 additions and 82 deletions

View File

@@ -17,7 +17,7 @@
if (itemstack.is(Items.BUCKET) && !this.isBaby()) {
+ // CraftBukkit start - Got milk?
+ org.bukkit.event.player.PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent((WorldServer) entityhuman.level, entityhuman, this.blockPosition(), this.blockPosition(), null, itemstack, Items.MILK_BUCKET);
+ org.bukkit.event.player.PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent((WorldServer) entityhuman.level, entityhuman, this.blockPosition(), this.blockPosition(), null, itemstack, Items.MILK_BUCKET, enumhand);
+
+ if (event.isCancelled()) {
+ return EnumInteractionResult.PASS;