Fix world unload toLowercase - Fixes #3326

This commit is contained in:
Aikar 2020-05-09 10:59:10 -04:00
parent dda9680be5
commit 2572bd017c
No known key found for this signature in database
GPG key ID: 401ADFC9891FAAFE

View file

@ -97,7 +97,7 @@ index 8477febca23b575da21023b4d7c18bb679cf3b30..dcdd8d38dee89ae7ac404a431e51a61c
this.V = i + 1;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index b89f99a66fe2ab9ad4c956c38c9e4b1d79716c9c..5a40661c1cecde80760f4f87027f7ca8cde6817e 100644
index b89f99a66fe2ab9ad4c956c38c9e4b1d79716c9c..c2b7cb36052455eef2100a1924dc76a5921fa858 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -60,6 +60,7 @@ import net.minecraft.server.EntityPlayer;
@ -115,7 +115,7 @@ index b89f99a66fe2ab9ad4c956c38c9e4b1d79716c9c..5a40661c1cecde80760f4f87027f7ca8
- console.worldServer.remove(handle.getWorldProvider().getDimensionManager());
+ // Paper start
+ DimensionManager dimensionManager = handle.getWorldProvider().getDimensionManager();
+ DimensionManager.unregister(world.getName(), dimensionManager);
+ DimensionManager.unregister(world.getName().toLowerCase(java.util.Locale.ENGLISH), dimensionManager);
+ console.worldServer.remove(dimensionManager);
+ // Paper end
return true;