Revert
This commit is contained in:
parent
3bf95f6eba
commit
9f6199b8f2
@ -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
|
||||
|
||||
}
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <b>Asynchronous tasks should never access any API in Bukkit. Great care
|
||||
* should be taken to assure the thread-safety of asynchronous tasks.</b>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user