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

This commit is contained in:
Luck 2020-05-16 18:19:05 +01:00
parent c120fa6a4d
commit 4cbbbd390f
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
2 changed files with 4 additions and 1 deletions

View File

@ -20,7 +20,6 @@ For more information, see the wiki article on [Why LuckPerms?](https://github.co
## Useful Links ## Useful Links
The latest downloads & other useful links can be found on the project homepage at [luckperms.net](https://luckperms.net/). 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 ## Building
LuckPerms uses Gradle to handle dependencies & building. LuckPerms uses Gradle to handle dependencies & building.

View File

@ -78,6 +78,10 @@ public class BukkitCommandListUpdater {
// Called when the buffer times out. // Called when the buffer times out.
private void sendUpdate(UUID uniqueId) { private void sendUpdate(UUID uniqueId) {
if (this.plugin.getBootstrap().isServerStopping()) {
return;
}
this.plugin.getBootstrap().getScheduler().sync().execute(() -> { this.plugin.getBootstrap().getScheduler().sync().execute(() -> {
Player player = this.plugin.getBootstrap().getPlayer(uniqueId).orElse(null); Player player = this.plugin.getBootstrap().getPlayer(uniqueId).orElse(null);
if (player != null) { if (player != null) {