mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-22 15:29:54 +00:00
Fix some Packet / Language Handling for Race Condition
This commit is contained in:
1 parent
6007b49271
commit
dbca3da639
3 files changed
+57
-11
No files matched your search
@@ -53,6 +53,12 @@ public interface IScriptHandlerPacket extends IScriptHandler {
|
||||
return new GuiDataResult(GuiDataKind.LOAD_COMPLETE, -1);
|
||||
}
|
||||
|
||||
// Ignore unrelated packets (e.g. ScriptInfoPacket config data)
|
||||
// that don't contain any expected keys for this handler
|
||||
if (!compound.hasKey("Tab") && !compound.hasKey("ScriptLanguage") && !compound.hasKey("ScriptEnabled")) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!compound.hasKey("Tab")) {
|
||||
setLanguage(compound.getString("ScriptLanguage"));
|
||||
setEnabled(compound.getBoolean("ScriptEnabled"));
|
||||
|
||||
Reference in new issue
Block a user