mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-19 06:42:02 +01:00
SPIGOT-7904: Fix NPE for PlayerItemBreakEvent
By: Doc <nachito94@msn.com>
This commit is contained in:
parent
c33c116001
commit
c98b18d4a2
@ -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 New Issue
Block a user