ManagedScript should store a copy of current loading script path.
This commit is contained in:
parent
d278e64e5d
commit
a2d4e16736
@ -288,7 +288,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_quest_reload " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -74,7 +73,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcQuestHtmlMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -2796,12 +2794,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean status)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -288,7 +288,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_quest_reload " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -75,7 +74,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcQuestHtmlMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -2798,12 +2796,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean status)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -288,7 +288,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_quest_reload " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -76,7 +75,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcQuestHtmlMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -2799,12 +2797,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean status)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -288,7 +288,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_quest_reload " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -77,7 +76,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcQuestHtmlMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -2799,12 +2797,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean status)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -288,7 +288,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_quest_reload " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -77,7 +76,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcQuestHtmlMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -2799,12 +2797,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean status)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -288,7 +288,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_quest_reload " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -77,7 +76,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcQuestHtmlMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -2799,12 +2797,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean status)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -288,7 +288,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_quest_reload " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -77,7 +76,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcQuestHtmlMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -2799,12 +2797,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean status)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -288,7 +288,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_quest_reload " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -77,7 +76,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcQuestHtmlMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -2809,12 +2807,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean status)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -288,7 +288,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_quest_reload " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -77,7 +76,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcQuestHtmlMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -2809,12 +2807,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean status)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -288,7 +288,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_quest_reload " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -77,7 +76,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcQuestHtmlMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -2809,12 +2807,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean status)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -288,7 +288,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_quest_reload " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -77,7 +76,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcQuestHtmlMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -2809,12 +2807,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean status)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -288,7 +288,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_quest_reload " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -77,7 +76,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcQuestHtmlMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -2809,12 +2807,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean status)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -60,7 +59,6 @@ import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ManagedScript;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
|
||||
/**
|
||||
* @author Luis Arias
|
||||
@ -1763,12 +1761,6 @@ public class Quest extends ManagedScript
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
public QuestState getClanLeaderQuestState(Player player, Npc npc)
|
||||
{
|
||||
// If player is the leader, retrieves directly the qS and bypass others checks
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -60,7 +59,6 @@ import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ManagedScript;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
|
||||
/**
|
||||
* @author Luis Arias
|
||||
@ -1763,12 +1761,6 @@ public class Quest extends ManagedScript
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
public QuestState getClanLeaderQuestState(Player player, Npc npc)
|
||||
{
|
||||
// If player is the leader, retrieves directly the qS and bypass others checks
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -274,7 +274,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></tr></td></table>");
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_quest_reload " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -62,7 +61,6 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
import org.l2jmobius.gameserver.model.zone.ZoneType;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -2468,12 +2466,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean status)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -274,7 +274,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></tr></td></table>");
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_quest_reload " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -63,7 +62,6 @@ import org.l2jmobius.gameserver.model.zone.ZoneType;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcQuestHtmlMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -2469,12 +2467,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean status)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -274,7 +274,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></tr></td></table>");
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_quest_reload " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -65,7 +64,6 @@ import org.l2jmobius.gameserver.model.zone.ZoneType;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcQuestHtmlMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -2512,12 +2510,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean status)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -288,7 +288,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_quest_reload " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -74,7 +73,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcQuestHtmlMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -2753,12 +2751,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean status)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -288,7 +288,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_quest_reload " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -74,7 +73,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcQuestHtmlMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -2753,12 +2751,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean status)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -288,7 +288,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_quest_reload " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -74,7 +73,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcQuestHtmlMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -2753,12 +2751,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean status)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -288,7 +288,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_quest_reload " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -74,7 +73,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcQuestHtmlMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -2753,12 +2751,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean status)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -288,7 +288,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_quest_reload " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -74,7 +73,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcQuestHtmlMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -2753,12 +2751,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean status)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -288,7 +288,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_quest_reload " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -74,7 +73,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcQuestHtmlMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -2753,12 +2751,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean status)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -288,7 +288,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_quest_reload " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -74,7 +73,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcQuestHtmlMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -2753,12 +2751,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean status)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -288,7 +288,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_quest_reload " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -75,7 +74,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcQuestHtmlMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -2760,12 +2758,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean status)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -288,7 +288,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_quest_reload " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -75,7 +74,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcQuestHtmlMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -2760,12 +2758,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean status)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -288,7 +288,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_quest_reload " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -75,7 +74,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcQuestHtmlMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -2760,12 +2758,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean status)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -288,7 +288,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_quest_reload " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@ -75,7 +74,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcQuestHtmlMessage;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@ -2760,12 +2758,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getScriptPath()
|
||||
{
|
||||
return ScriptEngineManager.getInstance().getCurrentLoadingScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean status)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for classes that are meant to be implemented by scripts.<br>
|
||||
* @author KenM
|
||||
@ -35,12 +34,10 @@ public abstract class ManagedScript
|
||||
|
||||
public ManagedScript()
|
||||
{
|
||||
_scriptFile = getScriptPath();
|
||||
_scriptFile = Path.of(ScriptEngineManager.getInstance().getCurrentLoadingScript().toUri());
|
||||
setLastLoadTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public abstract Path getScriptPath();
|
||||
|
||||
/**
|
||||
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
|
||||
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
|
||||
@ -50,7 +47,7 @@ public abstract class ManagedScript
|
||||
{
|
||||
try
|
||||
{
|
||||
ScriptEngineManager.getInstance().executeScript(getScriptFile());
|
||||
ScriptEngineManager.getInstance().executeScript(_scriptFile);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
Loading…
Reference in New Issue
Block a user