From f80017de6746bcd985dfa773edf7a6d1e8328dc4 Mon Sep 17 00:00:00 2001 From: Gabriele C Date: Tue, 28 Jul 2015 01:26:04 +0200 Subject: [PATCH] Fixed xD --- .../process/register/ProcessSyncronousEmailRegister.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/fr/xephi/authme/process/register/ProcessSyncronousEmailRegister.java b/src/main/java/fr/xephi/authme/process/register/ProcessSyncronousEmailRegister.java index a7a8ab88a..ede70c189 100644 --- a/src/main/java/fr/xephi/authme/process/register/ProcessSyncronousEmailRegister.java +++ b/src/main/java/fr/xephi/authme/process/register/ProcessSyncronousEmailRegister.java @@ -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);