add data_type:simple

This commit is contained in:
Xanadu13
2024-03-18 16:26:22 +08:00
parent ee47b2254a
commit 7ed7122c8e
@@ -38,6 +38,23 @@ public abstract class GUISlot {
return new EmptySlot(); return new EmptySlot();
} }
protected enum DataType{ protected enum DataType{
DEFAULT,NBT,ADVANCED DEFAULT,NBT,ADVANCED,SIMPLE;
public static DataType fromString(String data_type){
if (data_type == null) return DEFAULT;
switch (data_type){
case "nbt": {
return NBT;
}
case "advanced": {
return ADVANCED;
}
case "simple": {
return SIMPLE;
}
default: {
return DEFAULT;
}
}
}
} }
} }