mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-17 23:01:01 +01:00
SPIGOT-7904: Fix NPE for PlayerItemBreakEvent
By: Doc <nachito94@msn.com>
This commit is contained in:
parent
c33c116001
commit
c98b18d4a2
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue