diff --git a/src/main/java/me/totalfreedom/totalfreedommod/config/ConfigEntry.java b/src/main/java/me/totalfreedom/totalfreedommod/config/ConfigEntry.java index 71c41f0f..de923b8e 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/config/ConfigEntry.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/config/ConfigEntry.java @@ -247,17 +247,4 @@ public enum ConfigEntry { return TotalFreedomMod.getPlugin().config; } - - public static ConfigEntry findConfigEntry(String name) - { - name = name.toLowerCase().replace("_", ""); - for (ConfigEntry entry : values()) - { - if (entry.toString().toLowerCase().replace("_", "").equals(name)) - { - return entry; - } - } - return null; - } } diff --git a/src/main/java/me/totalfreedom/totalfreedommod/httpd/ModuleExecutable.java b/src/main/java/me/totalfreedom/totalfreedommod/httpd/ModuleExecutable.java index b6adb6de..114777b4 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/httpd/ModuleExecutable.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/httpd/ModuleExecutable.java @@ -1,7 +1,6 @@ package me.totalfreedom.totalfreedommod.httpd; import java.lang.reflect.Constructor; -import java.util.Objects; import me.totalfreedom.totalfreedommod.TotalFreedomMod; import me.totalfreedom.totalfreedommod.httpd.module.HTTPDModule; import me.totalfreedom.totalfreedommod.util.FLog; @@ -26,14 +25,7 @@ public abstract class ModuleExecutable } // Sync to server thread - return Bukkit.getScheduler().callSyncMethod(TotalFreedomMod.getPlugin(), new Callable() - { - @Override - public NanoHTTPD.Response call() throws Exception - { - return getResponse(session); - } - }).get(); + return Bukkit.getScheduler().callSyncMethod(TotalFreedomMod.getPlugin(), () -> getResponse(session)).get(); } catch (Exception ex) @@ -75,28 +67,6 @@ public abstract class ModuleExecutable }; } - public NanoHTTPD.Response execute(final NanoHTTPD.HTTPSession session) - { - try - { - if (async) - { - return getResponse(session); - } - - // Sync to server thread - return Bukkit.getScheduler().callSyncMethod(Objects.requireNonNull(TotalFreedomMod.plugin()), () -> getResponse(session)).get(); - - } - catch (Exception ex) - { - FLog.severe(ex); - } - return null; - } - - public abstract NanoHTTPD.Response getResponse(NanoHTTPD.HTTPSession session); - public boolean isAsync() { return async;