diff --git a/src/main/java/fr/xephi/authme/cache/limbo/LimboCache.java b/src/main/java/fr/xephi/authme/cache/limbo/LimboCache.java index 69774e221..2495d68b6 100644 --- a/src/main/java/fr/xephi/authme/cache/limbo/LimboCache.java +++ b/src/main/java/fr/xephi/authme/cache/limbo/LimboCache.java @@ -117,6 +117,8 @@ public class LimboCache { * @param name String */ public void deleteLimboPlayer(String name) { + if (name == null) + return; cache.remove(name); } @@ -128,6 +130,8 @@ public class LimboCache { * @return LimboPlayer */ public LimboPlayer getLimboPlayer(String name) { + if (name == null) + return null; return cache.get(name); } @@ -139,6 +143,8 @@ public class LimboCache { * @return boolean */ public boolean hasLimboPlayer(String name) { + if (name == null) + return false; return cache.containsKey(name); } diff --git a/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java b/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java index 3160ddcc4..8fae6f0f6 100644 --- a/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java +++ b/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java @@ -253,8 +253,11 @@ public class AsynchronousJoin { ? m.retrieve(MessageKey.REGISTER_EMAIL_MESSAGE) : m.retrieve(MessageKey.REGISTER_MESSAGE); } - BukkitTask msgTask = sched.runTaskAsynchronously(plugin, new MessageTask(plugin, name, msg, msgInterval)); - LimboCache.getInstance().getLimboPlayer(name).setMessageTaskId(msgTask); + if (LimboCache.getInstance().getLimboPlayer(name) != null) + { + BukkitTask msgTask = sched.runTaskAsynchronously(plugin, new MessageTask(plugin, name, msg, msgInterval)); + LimboCache.getInstance().getLimboPlayer(name).setMessageTaskId(msgTask); + } } private boolean needFirstSpawn() { diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 0c7607e3c..fd73b7733 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -393,6 +393,7 @@ Protection: - 'US' - 'GB' # Countries blacklisted automatically ( without any needed to enable protection ) + # PLEASE USE QUOTES! countriesBlacklist: - 'A1' # Do we need to enable automatic antibot system?