From dff09935e61185c0d6206cdfe1c598989983e076 Mon Sep 17 00:00:00 2001 From: games647 Date: Thu, 7 Jul 2016 11:34:22 +0200 Subject: [PATCH] Check settings async Based on https://github.com/AuthMe/AuthMeReloaded/commit/6be58ee2e2d467a1cb94148a3dff0ae91057af58#commitcomment-18154945 --- .../process/unregister/AsynchronousUnregister.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/fr/xephi/authme/process/unregister/AsynchronousUnregister.java b/src/main/java/fr/xephi/authme/process/unregister/AsynchronousUnregister.java index 9ace1844..f21225a0 100644 --- a/src/main/java/fr/xephi/authme/process/unregister/AsynchronousUnregister.java +++ b/src/main/java/fr/xephi/authme/process/unregister/AsynchronousUnregister.java @@ -86,15 +86,15 @@ public class AsynchronousUnregister implements AsynchronousProcess { // Apply blind effect final int timeout = service.getProperty(RestrictionSettings.TIMEOUT) * TICKS_PER_SECOND; - bukktiService.runTask(new Runnable() { - @Override - public void run() { - if (service.getProperty(RegistrationSettings.APPLY_BLIND_EFFECT)) { + if (service.getProperty(RegistrationSettings.APPLY_BLIND_EFFECT)) { + bukktiService.runTask(new Runnable() { + @Override + public void run() { player.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, timeout, 2)); } - } - }); - + }); + } + service.send(player, MessageKey.UNREGISTERED_SUCCESS); ConsoleLogger.info(player.getName() + " unregistered himself"); } else {