Fixed admin respawn commands.
This commit is contained in:
@@ -73,8 +73,29 @@ public final class QuestManager
|
||||
*/
|
||||
public void reloadAllScripts()
|
||||
{
|
||||
unloadAllScripts();
|
||||
|
||||
LOGGER.info("Reloading all server scripts.");
|
||||
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScriptList();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.log(Level.SEVERE, "Failed executing script list!", e);
|
||||
}
|
||||
|
||||
getInstance().report();
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload all quests and scripts.
|
||||
*/
|
||||
public void unloadAllScripts()
|
||||
{
|
||||
LOGGER.info("Unloading all server scripts.");
|
||||
|
||||
// Unload quests.
|
||||
for (Quest quest : _quests.values())
|
||||
{
|
||||
@@ -93,17 +114,6 @@ public final class QuestManager
|
||||
}
|
||||
}
|
||||
_scripts.clear();
|
||||
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScriptList();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.log(Level.SEVERE, "Failed executing script list!", e);
|
||||
}
|
||||
|
||||
getInstance().report();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -89,6 +89,19 @@ public class AutoSpawnHandler
|
||||
}
|
||||
|
||||
public void reload()
|
||||
{
|
||||
// unload
|
||||
unload();
|
||||
|
||||
// create clean list
|
||||
_registeredSpawns.clear();
|
||||
_runningSpawns.clear();
|
||||
|
||||
// load
|
||||
restoreSpawnData();
|
||||
}
|
||||
|
||||
public void unload()
|
||||
{
|
||||
// stop all timers
|
||||
for (ScheduledFuture<?> sf : _runningSpawns.values())
|
||||
@@ -106,13 +119,6 @@ public class AutoSpawnHandler
|
||||
removeSpawn(asi);
|
||||
}
|
||||
}
|
||||
|
||||
// create clean list
|
||||
_registeredSpawns.clear();
|
||||
_runningSpawns.clear();
|
||||
|
||||
// load
|
||||
restoreSpawnData();
|
||||
}
|
||||
|
||||
private void restoreSpawnData()
|
||||
|
Reference in New Issue
Block a user