mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-05 22:52:13 -07:00
SPIGOT-5225: World handle isn't closed if world is unloaded without saving
This commit is contained in:
@@ -981,13 +981,14 @@ public final class CraftServer implements Server {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (save) {
|
||||
try {
|
||||
try {
|
||||
if (save) {
|
||||
handle.save(null, true, true);
|
||||
handle.close();
|
||||
} catch (Exception ex) {
|
||||
getLogger().log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
handle.getChunkProvider().close(save);
|
||||
} catch (Exception ex) {
|
||||
getLogger().log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
worlds.remove(world.getName().toLowerCase(java.util.Locale.ENGLISH));
|
||||
|
Reference in New Issue
Block a user