From 731aa96648ded848d107dc49546e751f4feb2e5e Mon Sep 17 00:00:00 2001 From: Trever Fischer Date: Mon, 27 Feb 2012 19:24:04 -0500 Subject: [PATCH] Check permissions correctly --- src/main/java/us/camin/JoinListener.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/us/camin/JoinListener.java b/src/main/java/us/camin/JoinListener.java index 8e12539..9108a7d 100644 --- a/src/main/java/us/camin/JoinListener.java +++ b/src/main/java/us/camin/JoinListener.java @@ -57,17 +57,16 @@ public class JoinListener extends PlayerListener { public void onPlayerLogin(PlayerLoginEvent event) { Player p = event.getPlayer(); + if (p.hasPermission("caminus.whitelisted")) + return; try { if (!isUserAuthed(p.getName())) { event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, "An active camin.us account is required."); - return; } } catch (MalformedURLException e) { event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, "Auth URL is invalid!"); - return; } catch (IOException e) { event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, "Camin.us auth server seems down."); - return; } String[] motd = null; try {