mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-01-03 22:08:28 +00:00
Move update check message out of MOTD task (#4410)
Update message will now show after mail, and will not be affected by insane MOTD delays.
This commit is contained in:
parent
2fa9c6486e
commit
5334a3fd34
1 changed files with 8 additions and 8 deletions
|
@ -378,6 +378,14 @@ public class EssentialsPlayerListener implements Listener, FakeAccessor {
|
|||
}
|
||||
}
|
||||
|
||||
if (user.isAuthorized("essentials.updatecheck")) {
|
||||
ess.runTaskAsynchronously(() -> {
|
||||
for (String str : ess.getUpdateChecker().getVersionMessages(false, false)) {
|
||||
user.sendMessage(str);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (user.isAuthorized("essentials.fly.safelogin")) {
|
||||
user.getBase().setFallDistance(0);
|
||||
if (LocationUtil.shouldFly(user.getLocation())) {
|
||||
|
@ -440,14 +448,6 @@ public class EssentialsPlayerListener implements Listener, FakeAccessor {
|
|||
final TextPager pager = new TextPager(output, true);
|
||||
pager.showPage("1", null, "motd", user.getSource());
|
||||
}
|
||||
|
||||
if (user.isAuthorized("essentials.updatecheck")) {
|
||||
ess.runTaskAsynchronously(() -> {
|
||||
for (String str : ess.getUpdateChecker().getVersionMessages(false, false)) {
|
||||
user.sendMessage(str);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue