mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-17 15:55:11 +01:00
parent
23da023d53
commit
ee08087871
@ -83,9 +83,9 @@ public class LimboCache {
|
||||
public void deleteLimboPlayer(String name) {
|
||||
checkNotNull(name);
|
||||
name = name.toLowerCase();
|
||||
if (cache.containsKey(name)) {
|
||||
LimboPlayer cachedPlayer = cache.remove(name);
|
||||
if (cachedPlayer != null) {
|
||||
cache.get(name).clearTasks();
|
||||
cache.remove(name);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -175,7 +175,7 @@ public class AuthMePlayerListener implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Limit player X and Z movements to 1 block
|
||||
* Deny player Y+ movements (allows falling)
|
||||
*/
|
||||
|
@ -5,6 +5,7 @@ import fr.xephi.authme.ConsoleLogger;
|
||||
import fr.xephi.authme.cache.auth.PlayerAuth;
|
||||
import fr.xephi.authme.cache.auth.PlayerCache;
|
||||
import fr.xephi.authme.cache.limbo.LimboCache;
|
||||
import fr.xephi.authme.cache.limbo.LimboPlayer;
|
||||
import fr.xephi.authme.datasource.DataSource;
|
||||
import fr.xephi.authme.events.FirstSpawnTeleportEvent;
|
||||
import fr.xephi.authme.events.ProtectInventoryEvent;
|
||||
@ -208,7 +209,10 @@ public class AsynchronousJoin implements Process {
|
||||
int msgInterval = service.getProperty(RegistrationSettings.MESSAGE_INTERVAL);
|
||||
if (registrationTimeout > 0) {
|
||||
BukkitTask id = service.runTaskLater(new TimeoutTask(plugin, name, player), registrationTimeout);
|
||||
LimboCache.getInstance().getLimboPlayer(name).setTimeoutTask(id);
|
||||
LimboPlayer limboPlayer = LimboCache.getInstance().getLimboPlayer(name);
|
||||
if (limboPlayer != null) {
|
||||
limboPlayer.setTimeoutTask(id);
|
||||
}
|
||||
}
|
||||
|
||||
MessageKey msg;
|
||||
@ -222,7 +226,10 @@ public class AsynchronousJoin implements Process {
|
||||
if (msgInterval > 0 && LimboCache.getInstance().getLimboPlayer(name) != null) {
|
||||
BukkitTask msgTask = service.runTask(new MessageTask(service.getBukkitService(), plugin.getMessages(),
|
||||
name, msg, msgInterval));
|
||||
LimboCache.getInstance().getLimboPlayer(name).setMessageTask(msgTask);
|
||||
LimboPlayer limboPlayer = LimboCache.getInstance().getLimboPlayer(name);
|
||||
if (limboPlayer != null) {
|
||||
limboPlayer.setMessageTask(msgTask);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user