This commit is contained in:
Gabriele C 2015-07-28 01:26:04 +02:00
parent 90d8fc8548
commit f80017de67

View File

@ -37,11 +37,13 @@ public class ProcessSyncronousEmailRegister implements Runnable {
BukkitScheduler sched = plugin.getServer().getScheduler();
if (time != 0) {
LimboCache.getInstance().getLimboPlayer(name).getTimeoutTaskId().cancel();
if (LimboCache.getInstance().getLimboPlayer(name).getTimeoutTaskId() != null)
LimboCache.getInstance().getLimboPlayer(name).getTimeoutTaskId().cancel();
BukkitTask id = sched.runTaskLaterAsynchronously(plugin, new TimeoutTask(plugin, name, player), time);
LimboCache.getInstance().getLimboPlayer(name).setTimeoutTaskId(id);
}
LimboCache.getInstance().getLimboPlayer(name).getMessageTaskId().cancel();
if (LimboCache.getInstance().getLimboPlayer(name).getMessageTaskId() != null)
LimboCache.getInstance().getLimboPlayer(name).getMessageTaskId().cancel();
BukkitTask nwMsg = sched.runTaskAsynchronously(plugin, new MessageTask(plugin, name, m.send("login_msg"), msgInterval));
LimboCache.getInstance().getLimboPlayer(name).setMessageTaskId(nwMsg);