Don't unregister the primary dimensions on world unload

This commit is contained in:
Aikar 2020-05-27 00:15:57 -04:00
parent a73ee9f448
commit 21d2cda885
2 changed files with 4 additions and 1 deletions

View File

@ -15,7 +15,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper start
+ public static void unregister(String s, DimensionManager dimensionmanager) {
+ MinecraftServer.getServer().execute(() -> {
+ if (dimensionmanager == OVERWORLD || dimensionmanager == NETHER || dimensionmanager == THE_END) { return; } // do not unregister the default worlds
+ MCUtil.MAIN_EXECUTOR.execute(() -> {
+ RegistryMaterials<DimensionManager> registry = (RegistryMaterials<DimensionManager>) IRegistry.DIMENSION_TYPE;
+ registry.deleteValue(new MinecraftKey(s), dimensionmanager);
+ });

View File

@ -356,6 +356,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ tryPreloadClass("com.google.common.collect.Iterators$PeekingImpl");
+ tryPreloadClass("com.google.common.collect.MapMakerInternalMap$Values");
+ tryPreloadClass("com.google.common.collect.MapMakerInternalMap$ValueIterator");
+ tryPreloadClass("com.google.common.collect.MapMakerInternalMap$WriteThroughEntry");
+ tryPreloadClass("com.google.common.collect.Iterables");
+ for (int i = 1; i <= 15; i++) {
+ tryPreloadClass("com.google.common.collect.Iterables$" + i, false);
@ -383,6 +384,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ tryPreloadClass("org.slf4j.helpers.FormattingTuple");
+ tryPreloadClass("org.slf4j.helpers.BasicMarker");
+ tryPreloadClass("org.slf4j.helpers.Util");
+ tryPreloadClass("com.destroystokyo.paper.event.player.PlayerConnectionCloseEvent");
+ // Minecraft, seen during saving
+ tryPreloadClass("net.minecraft.server.LightEngineLayerEventListener$Void");
+ tryPreloadClass("net.minecraft.server.LightEngineLayerEventListener");