diff --git a/src/main/java/net/seyarada/pandeloot/nms/v1_17_R1/V1_17_R1.java b/src/main/java/net/seyarada/pandeloot/nms/v1_17_R1/V1_17_R1.java index 29dd960..aee6598 100644 --- a/src/main/java/net/seyarada/pandeloot/nms/v1_17_R1/V1_17_R1.java +++ b/src/main/java/net/seyarada/pandeloot/nms/v1_17_R1/V1_17_R1.java @@ -129,16 +129,17 @@ public static void spawnHologram(DamageUtil damageUtil) { connection.sendPacket(packetPlayOutSpawnEntity); connection.sendPacket(metadata); } - - new BukkitRunnable() { - @Override - public void run() { - if (player.isOnline()) { - PacketPlayOutEntityDestroy destroy = new PacketPlayOutEntityDestroy(armorStand.getId()); - ((CraftPlayer) player).getHandle().b.sendPacket(destroy); + if (player != null) { + new BukkitRunnable() { + @Override + public void run() { + if (player.isOnline()) { + PacketPlayOutEntityDestroy destroy = new PacketPlayOutEntityDestroy(armorStand.getId()); + ((CraftPlayer) player).getHandle().b.sendPacket(destroy); + } } - } - }.runTaskLater(PandeLoot.getInstance(), 300); + }.runTaskLater(PandeLoot.getInstance(), 300); + } } }