mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
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.
This commit is contained in:
parent
eb4300d9e1
commit
55e3e3d0f8
2 changed files with 2 additions and 2 deletions
|
@ -1418,7 +1418,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(worlddata.getName(), this.spigotConfig); // Paper
|
||||
+ this.chunkPacketBlockController = this.paperConfig.antiXray ? new ChunkPacketBlockControllerAntiXray(this.paperConfig) : ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray
|
||||
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);
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
// CraftBukkit end
|
||||
|
|
|
@ -4414,7 +4414,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue