From 455864d14d5944c33f07d8821b35815c04fe3872 Mon Sep 17 00:00:00 2001 From: Xephi59 Date: Wed, 12 Aug 2015 21:04:04 +0200 Subject: [PATCH] Fix NPE --- .../java/fr/xephi/authme/listener/AuthMePlayerListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/fr/xephi/authme/listener/AuthMePlayerListener.java b/src/main/java/fr/xephi/authme/listener/AuthMePlayerListener.java index 93b431927..1b585f618 100644 --- a/src/main/java/fr/xephi/authme/listener/AuthMePlayerListener.java +++ b/src/main/java/fr/xephi/authme/listener/AuthMePlayerListener.java @@ -466,7 +466,7 @@ public class AuthMePlayerListener implements Listener { return; } - if (plugin.database.getType() != DataSource.DataSourceType.FILE) { + if (plugin.database.isAuthAvailable(name) && plugin.database.getType() != DataSource.DataSourceType.FILE) { PlayerAuth auth = plugin.database.getAuth(name); if (auth.getRealName() != null && !auth.getRealName().isEmpty() && !auth.getRealName().equalsIgnoreCase("Player") && !auth.getRealName().equals(player.getName())) { event.setKickMessage(m.send("same_nick")[0]);