diff --git a/src/main/java/dev/zontreck/ariaslib/util/DelayedExecutorService.java b/src/main/java/dev/zontreck/ariaslib/util/DelayedExecutorService.java index fb44318..af4fc70 100644 --- a/src/main/java/dev/zontreck/ariaslib/util/DelayedExecutorService.java +++ b/src/main/java/dev/zontreck/ariaslib/util/DelayedExecutorService.java @@ -21,6 +21,12 @@ public class DelayedExecutorService { static{ inst=new DelayedExecutorService(); repeater = new ScheduledThreadPoolExecutor(16); + repeater.scheduleAtFixedRate(new Runnable() { + @Override + public void run() { + DelayedExecutorService.getInstance().onTick(); + } + }, 1L, 1L, TimeUnit.SECONDS); } private DelayedExecutorService(){} @@ -45,14 +51,9 @@ public class DelayedExecutorService { /** * This function is designed to set back up the executor if it was previously stopped and restarted. */ + @Deprecated public static void setup() { - repeater.scheduleAtFixedRate(new Runnable() { - @Override - public void run() { - DelayedExecutorService.getInstance().onTick(); - } - }, 1L, 1L, TimeUnit.SECONDS); } /** @@ -143,10 +144,6 @@ public class DelayedExecutorService { public void onTick() { - if(!isRunning()) - { - DelayedExecutorService.stopRepeatingThread(); - } /*Iterator it = EXECUTORS.iterator(); try{