From 21d2cda885c7492927b00462584cafe224cede01 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 27 May 2020 00:15:57 -0400 Subject: [PATCH] Don't unregister the primary dimensions on world unload --- Spigot-Server-Patches/Fix-CraftServer.unloadWorld-Leak.patch | 3 ++- Spigot-Server-Patches/Improved-Watchdog-Support.patch | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Spigot-Server-Patches/Fix-CraftServer.unloadWorld-Leak.patch b/Spigot-Server-Patches/Fix-CraftServer.unloadWorld-Leak.patch index 4ef6e288ec..6226dbf047 100644 --- a/Spigot-Server-Patches/Fix-CraftServer.unloadWorld-Leak.patch +++ b/Spigot-Server-Patches/Fix-CraftServer.unloadWorld-Leak.patch @@ -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 registry = (RegistryMaterials) IRegistry.DIMENSION_TYPE; + registry.deleteValue(new MinecraftKey(s), dimensionmanager); + }); diff --git a/Spigot-Server-Patches/Improved-Watchdog-Support.patch b/Spigot-Server-Patches/Improved-Watchdog-Support.patch index c1b8161a66..c9c44618fd 100644 --- a/Spigot-Server-Patches/Improved-Watchdog-Support.patch +++ b/Spigot-Server-Patches/Improved-Watchdog-Support.patch @@ -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");