diff --git a/src/main/java/org/maxgamer/quickshop/Util/AsyncDetector.java b/src/main/java/org/maxgamer/quickshop/Util/AsyncDetector.java deleted file mode 100644 index b277cb481..000000000 --- a/src/main/java/org/maxgamer/quickshop/Util/AsyncDetector.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.maxgamer.quickshop.Util; - -import org.maxgamer.quickshop.QuickShop; - -public class AsyncDetector { - /** - * A helper to allow quickshop check the task is running under async thread. - * @return The calling method running under async thread. - */ - public static boolean isAsync() { - try { - Object serverInstance = Util.getNMSClass(null).getMethod("getServer").invoke(null); - Object serverThread = serverInstance.getClass().getField("serverThread"); - return Thread.currentThread() != serverThread; - }catch (Throwable throwable){ - QuickShop.instance.getLogger().warning("Failed to get Minecraft server instance, did you up-to-date the QuickShop?"); - return false; - } - - } -}