fix: check if FakePlayer is in Array before removing
This commit is contained in:
parent
6716988c45
commit
37e2e9d8e7
1 changed files with 3 additions and 1 deletions
|
@ -230,10 +230,12 @@ public class NPCManager {
|
||||||
connection.sendPacket(new PacketPlayOutEntityDestroy(npc.getId()));
|
connection.sendPacket(new PacketPlayOutEntityDestroy(npc.getId()));
|
||||||
}
|
}
|
||||||
this.npcs.remove(npc);
|
this.npcs.remove(npc);
|
||||||
|
if (this.isDying.contains(npc.getId())) {
|
||||||
this.isDying.remove(npc.getId());
|
this.isDying.remove(npc.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void removeClone(final UUID uuid) {
|
public void removeClone(final UUID uuid) {
|
||||||
for (int i = 0; i < this.npcs.size(); i++) {
|
for (int i = 0; i < this.npcs.size(); i++) {
|
||||||
|
|
Loading…
Reference in a new issue