Improved handling of unloadLater()

This commit is contained in:
Butzlabben 2019-10-04 13:23:40 +02:00
parent b5352a25d3
commit 42efaf4518
1 changed files with 5 additions and 0 deletions

View File

@ -217,6 +217,11 @@ public class SystemWorld {
Bukkit.getScheduler().runTask(WorldSystem.getInstance(), () -> unloadLater(w));
return;
}
// Do not start another unload task
if (unloading) {
return;
}
Preconditions.checkNotNull(w, "world must not be null");
WorldUnloadEvent event = new WorldUnloadEvent(this);