Minor - rename LimboPlayer methods + code householding

- Rename *taskId methods to *task to reflect what they handle
- Remove usages of Wrapper where applicable
- Replace some uses of legacy Settings with NewSetting calls
This commit is contained in:
ljacqu
2016-03-06 15:38:08 +01:00
parent 3f4681c5ed
commit 654cebd5a7
21 changed files with 99 additions and 109 deletions
@@ -64,8 +64,6 @@ public class AsynchronousJoin implements Process {
}
final String ip = service.getIpAddressManager().getPlayerIp(player);
if (isNameRestricted(name, ip, player.getAddress().getHostName(), service.getSettings())) {
service.scheduleSyncDelayedTask(new Runnable() {
@Override
@@ -196,7 +194,7 @@ 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).setTimeoutTaskId(id);
LimboCache.getInstance().getLimboPlayer(name).setTimeoutTask(id);
}
MessageKey msg;
@@ -209,7 +207,7 @@ public class AsynchronousJoin implements Process {
}
if (msgInterval > 0 && LimboCache.getInstance().getLimboPlayer(name) != null) {
BukkitTask msgTask = service.runTask(new MessageTask(plugin, name, msg, msgInterval));
LimboCache.getInstance().getLimboPlayer(name).setMessageTaskId(msgTask);
LimboCache.getInstance().getLimboPlayer(name).setMessageTask(msgTask);
}
}