From 2cd7bc8512c6f9420418c778a1cc44e617bffadc Mon Sep 17 00:00:00 2001 From: vanhec_a Date: Mon, 2 Nov 2015 10:16:01 +0100 Subject: [PATCH] Check a boolean is a quickest way than check database :) --- .../java/fr/xephi/authme/listener/AuthMePlayerListener.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/fr/xephi/authme/listener/AuthMePlayerListener.java b/src/main/java/fr/xephi/authme/listener/AuthMePlayerListener.java index 479b8692d..cf0eefc0f 100644 --- a/src/main/java/fr/xephi/authme/listener/AuthMePlayerListener.java +++ b/src/main/java/fr/xephi/authme/listener/AuthMePlayerListener.java @@ -66,12 +66,12 @@ public class AuthMePlayerListener implements Listener { private void handleChat(AsyncPlayerChatEvent event) { Player player = event.getPlayer(); + + if (Settings.isChatAllowed) + return; if (Utils.checkAuth(player)) return; - if (Settings.isChatAllowed) { - return; - } event.setCancelled(true); if (plugin.database.isAuthAvailable(player.getName().toLowerCase())) {