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.
|
// processed in other order.
|
||||||
ProcessSyncronousPlayerLogin syncronousPlayerLogin = new ProcessSyncronousPlayerLogin(player, plugin, database);
|
ProcessSyncronousPlayerLogin syncronousPlayerLogin = new ProcessSyncronousPlayerLogin(player, plugin, database);
|
||||||
if (syncronousPlayerLogin.getLimbo() != null) {
|
if (syncronousPlayerLogin.getLimbo() != null) {
|
||||||
syncronousPlayerLogin.getLimbo().getTimeoutTaskId().cancel();
|
if (syncronousPlayerLogin.getLimbo().getTimeoutTaskId() != null)
|
||||||
syncronousPlayerLogin.getLimbo().getMessageTaskId().cancel();
|
syncronousPlayerLogin.getLimbo().getTimeoutTaskId().cancel();
|
||||||
|
if (syncronousPlayerLogin.getLimbo().getMessageTaskId() != null)
|
||||||
|
syncronousPlayerLogin.getLimbo().getMessageTaskId().cancel();
|
||||||
}
|
}
|
||||||
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, syncronousPlayerLogin);
|
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, syncronousPlayerLogin);
|
||||||
} else if (player.isOnline()) {
|
} else if (player.isOnline()) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user