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