diff --git a/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java b/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java index 4d277bda..73f337ad 100644 --- a/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java +++ b/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java @@ -191,7 +191,7 @@ public class AsynchronousJoin implements AsynchronousProcess { int blindTimeOut = (registrationTimeout <= 0) ? 99999 : registrationTimeout; // AuthMeReReloaded start - Fix async potion apply on Folia - bukkitService.runTaskSyncIfFolia(() -> player.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, blindTimeOut, 2))); + player.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, blindTimeOut, 2)); // AuthMeReReloaded end } diff --git a/src/main/java/fr/xephi/authme/service/BukkitService.java b/src/main/java/fr/xephi/authme/service/BukkitService.java index ff59329f..2c30fcc4 100644 --- a/src/main/java/fr/xephi/authme/service/BukkitService.java +++ b/src/main/java/fr/xephi/authme/service/BukkitService.java @@ -141,18 +141,6 @@ public class BukkitService implements SettingsDependent { getScheduler().runTaskAsynchronously(task); } - /** - * Runs the task synchronously if we are on a Folia server, else runs normally. - * @param task the task to run - */ - public void runTaskSyncIfFolia(Runnable task) { - if (IS_FOLIA) { - runTask(task); - } else { - task.run(); - } - } - /** * Asynchronous tasks should never access any API in Bukkit. Great care * should be taken to assure the thread-safety of asynchronous tasks.