fix: check if FakePlayer is in Array before removing

This commit is contained in:
Simon Giesel 2020-05-09 15:48:12 +02:00
parent 6716988c45
commit 37e2e9d8e7

View file

@ -230,7 +230,9 @@ public class NPCManager {
connection.sendPacket(new PacketPlayOutEntityDestroy(npc.getId())); connection.sendPacket(new PacketPlayOutEntityDestroy(npc.getId()));
} }
this.npcs.remove(npc); this.npcs.remove(npc);
this.isDying.remove(npc.getId()); if (this.isDying.contains(npc.getId())) {
this.isDying.remove(npc.getId());
}
} }
} }
} }