mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 09:09:08 +00:00
Fix Server Side Crash
This commit is contained in:
1 parent
8e73428458
commit
61d253638a
6 files changed
+26
-7
No files matched your search
@@ -118,10 +118,11 @@ public class FieldDef {
|
||||
return def;
|
||||
}
|
||||
|
||||
public static FieldDef subGuiField(String label, Supplier<SubGuiInterface> factory, Consumer<SubGuiInterface> resultHandler) {
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> FieldDef subGuiField(String label, Supplier<T> factory, Consumer<T> resultHandler) {
|
||||
FieldDef def = new FieldDef(label, FieldType.SUB_GUI);
|
||||
def.subGuiFactory = factory;
|
||||
def.subGuiResultHandler = resultHandler;
|
||||
def.subGuiFactory = (Supplier<SubGuiInterface>) (Supplier<?>) factory;
|
||||
def.subGuiResultHandler = (Consumer<SubGuiInterface>) (Consumer<?>) resultHandler;
|
||||
return def;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user