mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-28 13:36:16 +01:00
fixed painting NPE
This commit is contained in:
parent
6711975658
commit
b075a58657
@ -206,7 +206,7 @@ public class EntityPainting extends Entity {
|
||||
|
||||
// CraftBukkit start
|
||||
Painting painting = (Painting) getBukkitEntity();
|
||||
PaintingBreakByEntityEvent event = new PaintingBreakByEntityEvent(painting,entity.getBukkitEntity());
|
||||
PaintingBreakByEntityEvent event = new PaintingBreakByEntityEvent(painting, entity == null ? null : entity.getBukkitEntity());
|
||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||
if (event.isCancelled()) {
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user