Хм, пример, который я привел придуман не мною, а просто выдран из Fortress и в данной сборке компилция проходит успешно. А замена на L2World.getInstance().getAllPlayers() не приводит к нужному результату
| ✂ |
| ✂ |
Теперь буду пытаться новый jbforth прикрутить
....
EnchantSkillTreeTable: Loaded 13200 enchant skills.
Abort: Unknown word 'item_spawn' in File: data\jbforth\l2j\spawns.f
... r >r >r
swap
self
r> r> r> >| item_spawn |<
;
....
Exception in input file .\data\jbforth\geodata\main.f
Input:
=== cut ===
File: .\data\jbforth\geodata\main.f
... odata: definitions
territories/main.f
previous >| definitions |<
=== cut ===
Return stack trace:
java.lang.NullPointerException
at ru.balancer.JBForth.findWord(JBForth.java:170)
at ru.balancer.JBForth.do_code(JBForth.java:246)
at ru.balancer.JBForth.do_code(JBForth.java:227)
at ru.balancer.jbforth.words.FileSystem$included.exec(FileSystem.java:42
)
at ru.balancer.JBForth.tryAsFileExact(JBForth.java:365)
at ru.balancer.JBForth.tryAsFileWithPath(JBForth.java:349)
at ru.balancer.JBForth.tryAsFile(JBForth.java:332)
at ru.balancer.JBForth.do_code(JBForth.java:307)
at ru.balancer.JBForth.do_code(JBForth.java:227)
at ru.balancer.jbforth.words.FileSystem$included.exec(FileSystem.java:42
)
at ru.balancer.JBForth.tryAsFileExact(JBForth.java:365)
at ru.balancer.JBForth.tryAsFileWithPath(JBForth.java:343)
at ru.balancer.JBForth.tryAsFile(JBForth.java:332)
at ru.balancer.JBForth.do_code(JBForth.java:307)
at ru.balancer.JBForth.do_code(JBForth.java:227)
at ru.balancer.jbforth.words.FileSystem$included.exec(FileSystem.java:42
)
at ru.balancer.JBForth.tryAsFileExact(JBForth.java:365)
at ru.balancer.JBForth.tryAsFileWithPath(JBForth.java:340)
at ru.balancer.JBForth.tryAsFile(JBForth.java:335)
at ru.balancer.JBForth.do_code(JBForth.java:307)
at ru.balancer.JBForth.do_code(JBForth.java:219)
at ru.balancer.JBForth.exec(JBForth.java:138)
at ru.balancer.JBForth.execp(JBForth.java:149)
at ru.balancer.JBForth.reload(JBForth.java:119)
at ru.balancer.JBForth.<init>(JBForth.java:92)
at net.sf.l2j.gameserver.GameServer.<init>(GameServer.java:165)
at net.sf.l2j.gameserver.GameServer.main(GameServer.java:512)



void runImpl()
{
if(Config.DEBUG)
_log.info("Got command '" + _command + "'");
L2Player activeChar = getClient().getActiveChar();
if(activeChar == null)
return;
String word = (_command.split("\\s+"))[0];
String args = _command.substring(word.length()).trim();
if(JBForth.word_exists("admin_" + word))
{
if(Config.DEBUG)
_log.info("Parsed by forth as '" + args + "' admin_" + word);
if(!(activeChar.getPlayerAccess().IsGM || activeChar.getPlayerAccess().CanUseGMCommand))
{
activeChar.illegalAction(activeChar.getName() + " user use adm command admin_" + _command, 200);
return;
}
JBForth tmp = new JBForth(activeChar);
tmp.st.push(args);
tmp.execp("admin_" + word);
return;
}
if(JBForth.word_exists("gm_" + word))
{
if(Config.DEBUG)
_log.info("Parsed by forth as '" + args + "' gm_" + word);
if(!(activeChar.getPlayerAccess().IsGM || activeChar.getPlayerAccess().CanUseGMCommand))
{
activeChar.illegalAction(activeChar.getName() + " user use adm command admin_" + _command, 200);
return;
}
JBForth tmp = new JBForth(activeChar);
tmp.st.push(args);
tmp.execp("gm_" + word);
return;
}
IAdminCommandHandler ach = AdminCommandHandler.getInstance().getAdminCommandHandler("admin_" + _command);
if(ach != null)
{
if(!(activeChar.getPlayerAccess().IsGM || activeChar.getPlayerAccess().CanUseGMCommand))
{
activeChar.illegalAction(activeChar.getName() + " user use adm command admin_" + _command, 200);
return;
}
ach.useAdminCommand("admin_" + _command, activeChar);
return;
}
if(activeChar.getPlayerAccess().UseForth)
{
if(Config.DEBUG)
_log.info("Eval by JBForth");
activeChar.getJBForth().execp(_command);
return;
}
activeChar.sendMessage("No access to use forth or command '" + _command + "' not recognized");
}