summaryrefslogtreecommitdiffstats
path: root/nms-patches/ItemBow.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/ItemBow.patch')
-rw-r--r--nms-patches/ItemBow.patch9
1 files changed, 7 insertions, 2 deletions
diff --git a/nms-patches/ItemBow.patch b/nms-patches/ItemBow.patch
index 64e6fd71..728c2c39 100644
--- a/nms-patches/ItemBow.patch
+++ b/nms-patches/ItemBow.patch
@@ -30,13 +30,18 @@
}
itemstack.damage(1, entityhuman);
-@@ -81,7 +96,10 @@
+@@ -81,7 +96,15 @@
entityarrow.fromPlayer = EntityArrow.PickupStatus.CREATIVE_ONLY;
}
- world.addEntity(entityarrow);
+ if (event.getProjectile() == entityarrow.getBukkitEntity()) {
-+ world.addEntity(entityarrow);
++ if (!world.addEntity(entityarrow)) {
++ if (entityhuman instanceof EntityPlayer) {
++ ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory();
++ }
++ return;
++ }
+ }
+ // CraftBukkit end
}