SPIGOT-5225: World handle isn't closed if world is unloaded without saving
By: md_5 <git@md-5.net>
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