Remove entities before a game world is unloaded; resolves #1050, resolves #1053, resolves #1007, resolves #962, resolves #1046
This commit is contained in:
parent
d32b8ad681
commit
81f520aabf
|
@ -475,6 +475,7 @@ public class DGameWorld extends DInstanceWorld implements GameWorld {
|
||||||
|
|
||||||
kickAllPlayers();
|
kickAllPlayers();
|
||||||
|
|
||||||
|
getWorld().getEntities().forEach(Entity::remove);
|
||||||
String name = getWorld().getName();
|
String name = getWorld().getName();
|
||||||
boolean unloaded = Bukkit.unloadWorld(getWorld(), /* SPIGOT-5225 */ !Version.isAtLeast(Version.MC1_14_4));
|
boolean unloaded = Bukkit.unloadWorld(getWorld(), /* SPIGOT-5225 */ !Version.isAtLeast(Version.MC1_14_4));
|
||||||
if (unloaded) {
|
if (unloaded) {
|
||||||
|
|
Loading…
Reference in New Issue