aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches/0004-MC-Utils.patch
diff options
context:
space:
mode:
authorAikar <[email protected]>2020-06-01 23:51:37 -0400
committerAikar <[email protected]>2020-06-02 01:29:18 -0400
commita4fe910f5722f9429ef926ce239bbb28926ca365 (patch)
tree3dbca3f6d0f0cd88fa3ac2db025a1bdea6003e8d /Spigot-Server-Patches/0004-MC-Utils.patch
parent70ad51a80c9ff18ee3cc27aa7c67d54b45944619 (diff)
downloadPaper-a4fe910f5722f9429ef926ce239bbb28926ca365.tar.gz
Paper-a4fe910f5722f9429ef926ce239bbb28926ca365.zip
Fix sounds when using worldedit regen command
Locks dimension manager to the first world its used with. WE is creating a temp world and the world ref on that manager is getting changed to the temp world. This would of also caused a memory leak of that temp world too.
Diffstat (limited to 'Spigot-Server-Patches/0004-MC-Utils.patch')
-rw-r--r--Spigot-Server-Patches/0004-MC-Utils.patch4
1 files changed, 2 insertions, 2 deletions
diff --git a/Spigot-Server-Patches/0004-MC-Utils.patch b/Spigot-Server-Patches/0004-MC-Utils.patch
index d6470aa738..e8581590a0 100644
--- a/Spigot-Server-Patches/0004-MC-Utils.patch
+++ b/Spigot-Server-Patches/0004-MC-Utils.patch
@@ -4399,7 +4399,7 @@ index 143be566c683ae035997f9a4058381a109f3de23..0e30d8c9933dc6595b9715ef6dc99cc8
return VoxelShapes.b;
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
-index 2e1eabba14a3757d03fd90741651001e78c6322f..d9ff52eda71fcdf88d4c9114450237bcba2ccb08 100644
+index 2e1eabba14a3757d03fd90741651001e78c6322f..45ded8cd3aee69083f6196765208d8c2430f0a02 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -22,6 +22,7 @@ import org.bukkit.craftbukkit.SpigotTimings; // Spigot
@@ -4414,7 +4414,7 @@ index 2e1eabba14a3757d03fd90741651001e78c6322f..d9ff52eda71fcdf88d4c9114450237bc
this.spigotConfig = new org.spigotmc.SpigotWorldConfig( worlddata.getName() ); // Spigot
this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(worlddata.getName(), this.spigotConfig); // Paper
this.generator = gen;
-+ dimensionmanager.world = (WorldServer) this; // Paper
++ if (dimensionmanager.world == null) dimensionmanager.world = (WorldServer) this; // Paper
this.world = new CraftWorld((WorldServer) this, gen, env);
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
this.ticksPerMonsterSpawns = this.getServer().getTicksPerMonsterSpawns(); // CraftBukkit