SPIGOT-7904: Fix NPE for PlayerItemBreakEvent
This commit is contained in:
parent
f35bae9ec8
commit
98c57cbbee
@ -307,7 +307,7 @@
|
||||
if (j >= this.getMaxDamage()) {
|
||||
Item item = this.getItem();
|
||||
+ // CraftBukkit start - Check for item breaking
|
||||
+ if (this.count == 1) {
|
||||
+ if (this.count == 1 && entityplayer != null) {
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemBreakEvent(entityplayer, this);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
Loading…
x
Reference in New Issue
Block a user