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,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());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue