check if npc is saveable instead of modifiable when unregistering all npcs

This commit is contained in:
D3v1s0m 2023-10-15 20:21:00 +05:30
parent 9d7b031ffa
commit d7071cef47
No known key found for this signature in database
GPG Key ID: FA1F770C7B1D40C1

@ -63,7 +63,9 @@ public class NpcRegistryImpl implements NpcRegistry {
} }
private void unregisterAll() { private void unregisterAll() {
for (NpcEntryImpl entry : getAllModifiable()) entry.getNpc().delete(); for (NpcEntryImpl entry : getAll()) {
if (entry.isSave()) entry.getNpc().delete();
}
npcList.clear(); npcList.clear();
npcIdLookupMap.clear(); npcIdLookupMap.clear();
npcUuidLookupMap.clear(); npcUuidLookupMap.clear();