Fix async potion effect

This commit is contained in:
HaHaWTH 2024-03-25 16:31:03 +08:00
parent 6f104f0b2e
commit 1c759b2476

View File

@ -189,7 +189,9 @@ public class AsynchronousJoin implements AsynchronousProcess {
if (service.getProperty(RegistrationSettings.APPLY_BLIND_EFFECT)) {
// Allow infinite blindness effect
int blindTimeOut = (registrationTimeout <= 0) ? 99999 : registrationTimeout;
bukkitService.runTask(() -> {
player.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, blindTimeOut, 2));
});
}
commandManager.runCommandsOnJoin(player);
});