diff options
author | Travis Ralston <travpc@gmail.com> | 2012-05-06 21:38:01 -0600 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2012-06-21 01:10:30 -0500 |
commit | 9f37f705272d633c8cf316b3522833ad6441c1d9 (patch) | |
tree | 09b5af5b782f4dcc7559ecbb7f3f4a9ddd818c83 /src/main/java/net/minecraft | |
parent | 8bc42ba8c94ea7ceae81d0620434162333fde404 (diff) | |
download | craftbukkit-9f37f705272d633c8cf316b3522833ad6441c1d9.tar craftbukkit-9f37f705272d633c8cf316b3522833ad6441c1d9.tar.gz craftbukkit-9f37f705272d633c8cf316b3522833ad6441c1d9.tar.lz craftbukkit-9f37f705272d633c8cf316b3522833ad6441c1d9.tar.xz craftbukkit-9f37f705272d633c8cf316b3522833ad6441c1d9.zip |
Fire PlayerItemBreakEvent. Addresses BUKKIT-1600
Diffstat (limited to 'src/main/java/net/minecraft')
-rw-r--r-- | src/main/java/net/minecraft/server/ItemStack.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java index 5366f45f..a444c713 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -179,6 +179,12 @@ public final class ItemStack { this.count = 0; } + // CraftBukkit start - Check for item breaking + if (this.count == 0 && entityliving instanceof EntityHuman) { + org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemBreakEvent((EntityHuman) entityliving, this); + } + // CraftBukkit end + this.damage = 0; } } |