Skip to content

Commit

Permalink
fixed another nullpointer
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo B committed Aug 8, 2021
1 parent 50408a0 commit 128c7c2
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/main/java/net/seyarada/pandeloot/nms/v1_17_R1/V1_17_R1.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

}
Expand Down

0 comments on commit 128c7c2

Please sign in to comment.