mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-26 12:43:16 +00:00
Some Ability Helpers
This commit is contained in:
1 parent
8fc0155df8
commit
8aa6e926f6
12 files changed
+326
-92
No files matched your search
@@ -281,11 +281,9 @@ public class SubGuiAbilityConfig extends SubGuiInterface implements ITextfieldLi
|
||||
|
||||
// Declarative field handling (effects list, booleans, enums, sub-guis, clear buttons)
|
||||
if (builder.handleButtonEvent(id, guibutton)) {
|
||||
// SUB_GUI needs special handling: open the sub-gui
|
||||
FieldDef subGuiDef = builder.getActiveSubGuiField();
|
||||
if (subGuiDef != null && subGuiDef.getSubGuiFactory() != null) {
|
||||
setSubGui(subGuiDef.getSubGuiFactory().get());
|
||||
} else {
|
||||
// SUB_GUI fields are opened directly by the builder via setSubGuiWithResult().
|
||||
// Only rebuild if no sub-gui was opened (e.g. boolean toggle, enum change).
|
||||
if (!hasSubGui()) {
|
||||
initGui();
|
||||
}
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user