mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-22 20:09:49 +00:00
Script Token Handling
This commit is contained in:
1 parent
6489f75b7d
commit
7df1cfbfb9
19 files changed
+150
-31
No files matched your search
@@ -49,8 +49,9 @@ public class GuiScriptInterface extends GuiNPCInterface implements GuiYesNoCallb
|
||||
public Map<String, List<String>> languages = new HashMap();
|
||||
protected int scriptLimit = 1;
|
||||
public List<String> hookList = new ArrayList<String>();
|
||||
protected boolean loaded = false;
|
||||
protected volatile boolean loaded = false;
|
||||
protected boolean serverDataReceived = false;
|
||||
protected String scriptSessionToken = null;
|
||||
|
||||
protected Map<Integer, GuiScriptTextArea> textAreas = new HashMap<>();
|
||||
protected GuiScreen parent;
|
||||
@@ -755,6 +756,8 @@ public class GuiScriptInterface extends GuiNPCInterface implements GuiYesNoCallb
|
||||
return;
|
||||
}
|
||||
if (result.kind == IScriptHandlerPacket.GuiDataKind.METADATA) {
|
||||
if (compound.hasKey("ScriptSessionToken"))
|
||||
scriptSessionToken = compound.getString("ScriptSessionToken");
|
||||
loadLanguagesData(compound);
|
||||
return;
|
||||
}
|
||||
@@ -765,6 +768,8 @@ public class GuiScriptInterface extends GuiNPCInterface implements GuiYesNoCallb
|
||||
return;
|
||||
}
|
||||
|
||||
if (compound.hasKey("ScriptSessionToken"))
|
||||
scriptSessionToken = compound.getString("ScriptSessionToken");
|
||||
loadLanguagesData(compound);
|
||||
}
|
||||
|
||||
@@ -814,9 +819,7 @@ public class GuiScriptInterface extends GuiNPCInterface implements GuiYesNoCallb
|
||||
this.setScript();
|
||||
|
||||
if (handler instanceof IScriptHandlerPacket)
|
||||
((IScriptHandlerPacket) handler).sync();
|
||||
|
||||
|
||||
((IScriptHandlerPacket) handler).sync(scriptSessionToken);
|
||||
}
|
||||
|
||||
public void textUpdate(String text) {
|
||||
|
||||
Reference in new issue
Block a user