only register save shutdown task after npcs load
This commit is contained in:
parent
6dab7a13db
commit
51fdb8d8fb
1 changed files with 1 additions and 1 deletions
|
@ -135,7 +135,6 @@ public class ZNpcsPlus extends JavaPlugin {
|
||||||
NpcTypeRegistryImpl typeRegistry = new NpcTypeRegistryImpl();
|
NpcTypeRegistryImpl typeRegistry = new NpcTypeRegistryImpl();
|
||||||
NpcRegistryImpl npcRegistry = new NpcRegistryImpl(configManager, this, packetFactory, actionRegistry,
|
NpcRegistryImpl npcRegistry = new NpcRegistryImpl(configManager, this, packetFactory, actionRegistry,
|
||||||
scheduler, typeRegistry, propertyRegistry, textSerializer);
|
scheduler, typeRegistry, propertyRegistry, textSerializer);
|
||||||
if (configManager.getConfig().autoSaveEnabled()) shutdownTasks.add(npcRegistry::save);
|
|
||||||
shutdownTasks.add(npcRegistry::unload);
|
shutdownTasks.add(npcRegistry::unload);
|
||||||
|
|
||||||
UserManager userManager = new UserManager();
|
UserManager userManager = new UserManager();
|
||||||
|
@ -170,6 +169,7 @@ public class ZNpcsPlus extends JavaPlugin {
|
||||||
|
|
||||||
log(ChatColor.WHITE + " * Loading data...");
|
log(ChatColor.WHITE + " * Loading data...");
|
||||||
npcRegistry.reload();
|
npcRegistry.reload();
|
||||||
|
if (configManager.getConfig().autoSaveEnabled()) shutdownTasks.add(npcRegistry::save);
|
||||||
|
|
||||||
if (legacy) {
|
if (legacy) {
|
||||||
log(ChatColor.WHITE + " * Converting legacy data...");
|
log(ChatColor.WHITE + " * Converting legacy data...");
|
||||||
|
|
Loading…
Reference in a new issue