Fixed admin respawn commands.
This commit is contained in:
@@ -73,7 +73,27 @@ 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 +113,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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -93,6 +93,26 @@ public final class ZoneManager implements IGameXmlReader
|
||||
* Reload.
|
||||
*/
|
||||
public void reload()
|
||||
{
|
||||
// Unload zones.
|
||||
unload();
|
||||
|
||||
// Load the zones.
|
||||
load();
|
||||
|
||||
// Re-validate all characters in zones.
|
||||
for (L2Object obj : L2World.getInstance().getVisibleObjects())
|
||||
{
|
||||
if (obj.isCharacter())
|
||||
{
|
||||
((L2Character) obj).revalidateZone(true);
|
||||
}
|
||||
}
|
||||
|
||||
SETTINGS.clear();
|
||||
}
|
||||
|
||||
public void unload()
|
||||
{
|
||||
// Get the world regions
|
||||
int count = 0;
|
||||
@@ -119,20 +139,6 @@ public final class ZoneManager implements IGameXmlReader
|
||||
}
|
||||
}
|
||||
LOGGER.info(getClass().getSimpleName() + ": Removed zones in " + count + " regions.");
|
||||
|
||||
// Load the zones
|
||||
load();
|
||||
|
||||
// Re-validate all characters in zones
|
||||
for (L2Object obj : L2World.getInstance().getVisibleObjects())
|
||||
{
|
||||
if (obj.isCharacter())
|
||||
{
|
||||
((L2Character) obj).revalidateZone(true);
|
||||
}
|
||||
}
|
||||
|
||||
SETTINGS.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user