Abstracted gui option list and added patreon button

This commit is contained in:
Chicken-Bomes committed 2014-08-02 22:48:45 +10:00
1 parent ff5456cbd1
commit d7753d2e78
18 files changed
+253 -149

No files matched your search

+8 -3
View File
@@ -45,16 +45,21 @@ public abstract class Option
return 20;
}
private <T> T assertParentOverride(T elem) {
if(elem == null) throw new IllegalStateException("Option "+fullName()+" does not have a defined parent list. Use OptionList.setOptionList to insert a parent");
return elem;
}
public ConfigSet globalConfigSet() {
return parent.globalConfigSet();
return assertParentOverride(parent.globalConfigSet());
}
public ConfigSet worldConfigSet() {
return parent.worldConfigSet();
return assertParentOverride(parent.worldConfigSet());
}
public OptionList configBase() {
return parent.configBase();
return assertParentOverride(parent.configBase());
}
/**