mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
Fire PlayerItemBreakEvent. Addresses BUKKIT-1600
This commit is contained in:
1 parent
8bc42ba8c9
commit
9f37f70527
2 files changed
+12
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user