feat: Basic gui

This commit is contained in:
Discreater committed 2021-04-26 14:26:06 +08:00
1 parent 5283b0641f
commit 42bf760bcb
57 files changed
+2705 -600

No files matched your search

@@ -10,11 +10,17 @@ public class JecaConfig {
public static boolean initialized = false;
public static Configuration config;
public static boolean isForceClient() {
return EnumItems.ForceClient.getProperty().getBoolean();
}
public enum EnumItems {
EnableInventoryCheck, ListRecipeBlackList, ListRecipeCategory;
ForceClient, EnableInventoryCheck, ListRecipeBlackList, ListRecipeCategory;
public String getComment() {
switch (this) {
case ForceClient:
return "Set to true to force client mode: no item and recipe allowed, use key bindings instead.";
case EnableInventoryCheck:
return "Set to false to disable auto inventory check";
case ListRecipeBlackList:
@@ -28,6 +34,8 @@ public class JecaConfig {
public String getName() {
switch (this) {
case ForceClient:
return "ForceClient";
case EnableInventoryCheck:
return "EnableInventoryCheck";
case ListRecipeBlackList:
@@ -40,6 +48,7 @@ public class JecaConfig {
public String getCategory() {
switch (this) {
case ForceClient:
case EnableInventoryCheck:
case ListRecipeBlackList:
case ListRecipeCategory:
@@ -50,6 +59,7 @@ public class JecaConfig {
public EnumType getType() {
switch (this) {
case ForceClient:
case EnableInventoryCheck:
return EnumType.Boolean;
case ListRecipeBlackList:
@@ -61,6 +71,8 @@ public class JecaConfig {
public Object getDefault() {
switch (this) {
case ForceClient:
return false;
case EnableInventoryCheck:
return true;
case ListRecipeBlackList: