Idk how it can be null, but well ...
This commit is contained in:
parent
a1f963adf8
commit
0d1cf8c7e2
@ -117,6 +117,8 @@ public class LimboCache {
|
|||||||
* @param name String
|
* @param name String
|
||||||
*/
|
*/
|
||||||
public void deleteLimboPlayer(String name) {
|
public void deleteLimboPlayer(String name) {
|
||||||
|
if (name == null)
|
||||||
|
return;
|
||||||
cache.remove(name);
|
cache.remove(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,6 +130,8 @@ public class LimboCache {
|
|||||||
* @return LimboPlayer
|
* @return LimboPlayer
|
||||||
*/
|
*/
|
||||||
public LimboPlayer getLimboPlayer(String name) {
|
public LimboPlayer getLimboPlayer(String name) {
|
||||||
|
if (name == null)
|
||||||
|
return null;
|
||||||
return cache.get(name);
|
return cache.get(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,6 +143,8 @@ public class LimboCache {
|
|||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public boolean hasLimboPlayer(String name) {
|
public boolean hasLimboPlayer(String name) {
|
||||||
|
if (name == null)
|
||||||
|
return false;
|
||||||
return cache.containsKey(name);
|
return cache.containsKey(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -253,8 +253,11 @@ public class AsynchronousJoin {
|
|||||||
? m.retrieve(MessageKey.REGISTER_EMAIL_MESSAGE)
|
? m.retrieve(MessageKey.REGISTER_EMAIL_MESSAGE)
|
||||||
: m.retrieve(MessageKey.REGISTER_MESSAGE);
|
: m.retrieve(MessageKey.REGISTER_MESSAGE);
|
||||||
}
|
}
|
||||||
BukkitTask msgTask = sched.runTaskAsynchronously(plugin, new MessageTask(plugin, name, msg, msgInterval));
|
if (LimboCache.getInstance().getLimboPlayer(name) != null)
|
||||||
LimboCache.getInstance().getLimboPlayer(name).setMessageTaskId(msgTask);
|
{
|
||||||
|
BukkitTask msgTask = sched.runTaskAsynchronously(plugin, new MessageTask(plugin, name, msg, msgInterval));
|
||||||
|
LimboCache.getInstance().getLimboPlayer(name).setMessageTaskId(msgTask);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean needFirstSpawn() {
|
private boolean needFirstSpawn() {
|
||||||
|
|||||||
@ -393,6 +393,7 @@ Protection:
|
|||||||
- 'US'
|
- 'US'
|
||||||
- 'GB'
|
- 'GB'
|
||||||
# Countries blacklisted automatically ( without any needed to enable protection )
|
# Countries blacklisted automatically ( without any needed to enable protection )
|
||||||
|
# PLEASE USE QUOTES!
|
||||||
countriesBlacklist:
|
countriesBlacklist:
|
||||||
- 'A1'
|
- 'A1'
|
||||||
# Do we need to enable automatic antibot system?
|
# Do we need to enable automatic antibot system?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user