mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-09-07 12:48:03 +02:00
Add a better check to cancel a non existing task...
#AutoInHacks T.T
This commit is contained in:
parent
4bb9dc53f1
commit
a1c09aecfc
@ -169,7 +169,9 @@ public class AsyncronousLogin {
|
||||
// processed in other order.
|
||||
ProcessSyncronousPlayerLogin syncronousPlayerLogin = new ProcessSyncronousPlayerLogin(player, plugin, database);
|
||||
if (syncronousPlayerLogin.getLimbo() != null) {
|
||||
if (syncronousPlayerLogin.getLimbo().getTimeoutTaskId() != null)
|
||||
syncronousPlayerLogin.getLimbo().getTimeoutTaskId().cancel();
|
||||
if (syncronousPlayerLogin.getLimbo().getMessageTaskId() != null)
|
||||
syncronousPlayerLogin.getLimbo().getMessageTaskId().cancel();
|
||||
}
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, syncronousPlayerLogin);
|
||||
|
Loading…
Reference in New Issue
Block a user