Don't schedule command list updates if the server is stopping (#2301)

This commit is contained in:
Luck committed 2020-05-16 18:19:05 +01:00
1 parent c120fa6a4d
commit 4cbbbd390f
2 files changed
+4 -1

No files matched your search

-1
View File
@@ -20,7 +20,6 @@ For more information, see the wiki article on [Why LuckPerms?](https://github.co
## Useful Links
The latest downloads & other useful links can be found on the project homepage at [luckperms.net](https://luckperms.net/).
The latest **downloads** can be found on the [project's homepage](https://luckperms.net/).
## Building
LuckPerms uses Gradle to handle dependencies & building.
@@ -78,6 +78,10 @@ public class BukkitCommandListUpdater {
// Called when the buffer times out.
private void sendUpdate(UUID uniqueId) {
if (this.plugin.getBootstrap().isServerStopping()) {
return;
}
this.plugin.getBootstrap().getScheduler().sync().execute(() -> {
Player player = this.plugin.getBootstrap().getPlayer(uniqueId).orElse(null);
if (player != null) {