diff --git a/common/src/main/java/me/lucko/luckperms/common/utils/RepeatingTask.java b/common/src/main/java/me/lucko/luckperms/common/utils/RepeatingTask.java index 35e21db0..6f79870f 100644 --- a/common/src/main/java/me/lucko/luckperms/common/utils/RepeatingTask.java +++ b/common/src/main/java/me/lucko/luckperms/common/utils/RepeatingTask.java @@ -38,7 +38,15 @@ public abstract class RepeatingTask { protected RepeatingTask(long time, TimeUnit unit, String nameFormat) { this.executor = Executors.newSingleThreadScheduledExecutor(new ThreadFactoryBuilder().setNameFormat(nameFormat).build()); - this.executor.scheduleAtFixedRate(this::tick, time, time, unit); + this.executor.scheduleAtFixedRate(this::run, time, time, unit); + } + + private void run() { + try { + tick(); + } catch (Exception e) { + e.printStackTrace(); + } } protected abstract void tick();