mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 04:57:27 +00:00
Fixed empty scripting tabs making all following tabs not run code in player scripts.
This commit is contained in:
1 parent
1ddc316230
commit
9c7767312d
2 files changed
+5
-8
No files matched your search
@@ -84,7 +84,7 @@ public class PlayerDataScript implements IScriptHandler {
|
||||
script = (ScriptContainer)ScriptController.Instance.playerScripts.scripts.get(i);
|
||||
if (!errored.contains(i)) {
|
||||
if(script == null || script.errored || !script.hasCode() || ScriptController.Instance.playerScripts.errored.contains(i))
|
||||
return;
|
||||
continue;
|
||||
|
||||
script.run(type, event);
|
||||
|
||||
@@ -92,12 +92,9 @@ public class PlayerDataScript implements IScriptHandler {
|
||||
ScriptController.Instance.playerScripts.errored.add(i);
|
||||
}
|
||||
|
||||
Iterator var8 = script.console.entrySet().iterator();
|
||||
|
||||
while(var8.hasNext()) {
|
||||
Entry<Long, String> entry = (Entry)var8.next();
|
||||
if (!ScriptController.Instance.playerScripts.console.containsKey(entry.getKey())) {
|
||||
ScriptController.Instance.playerScripts.console.put(entry.getKey(), " tab " + (i + 1) + ":\n" + (String)entry.getValue());
|
||||
for (Entry<Long, String> longStringEntry : script.console.entrySet()) {
|
||||
if (!ScriptController.Instance.playerScripts.console.containsKey(longStringEntry.getKey())) {
|
||||
ScriptController.Instance.playerScripts.console.put(longStringEntry.getKey(), " tab " + (i + 1) + ":\n" + longStringEntry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user