Multiverse-Core icon indicating copy to clipboard operation
Multiverse-Core copied to clipboard

[Bug]: World config gets reset on server launch or MV reload.

Open BreadChaser opened this issue 1 year ago • 17 comments

/mv version -p output

https://paste.gg/adf08fbf7cc0444dbb3f4ee96c4b2a9d

Server logs

https://paste.gg/p/anonymous/53e8f3b8627a4f1ebc85d15f8c8ead43

Server Version

This server is running Paper version 1.21-38-master@1f5db50 (2024-06-27T20:15:58Z) (Implementing API version 1.21-R0.1-SNAPSHOT)

Bug Description

Upon Launching the server or using MV reload in 1.21 paper, it will reset the world config to defaults. It doesnt matter if you mess with it in the config file or use /mvm set it will reset whatever changes you made when using the commads or changing the config, with the server open or not. With more testing it seems most setting works but the KeepSpawnInMemory does not change when trying to set the property, and will reset itself on server launch, even if you set it manually when the server is shut down.

the only setting I see not resetting is Gamemode for some odd reason.

Steps to reproduce

  1. Make a configuration change in Worlds config file.
  2. Launch server, the config with be reset

Agreements

  • [X] I have searched for and ensured there isn't already an open or resolved issue(s) regarding this.
  • [X] I was able to reproduce my issue on a freshly setup and up-to-date server with the latest version of Multiverse plugins with no other plugins and with no kinds of other server or client mods.

BreadChaser avatar Jun 30 '24 07:06 BreadChaser

All my keepSpawnInMemory entries get reset to true on server load. running mvm set keepspawninmemory false [world] does NOT change them back.

mvm set keepSpawnInMemory false creative [08:14:00 INFO]: Success! Property keepSpawnInMemory was set to false

[Multiverse-Core] Version 4.3.12 (API v24) Enabled - By dumptruckman, Rigby, fernferret, lithium3141 and main--

( same happens with Multiverse-Core Version: 4.3.1-b861)

Paper version 1.20.6-147-ver/1.20.6@e41d44f (2024-06-17T19:24:35Z) (Implementing API version 1.20.6-R0.1-SNAPSHOT)

In the logs, this happens at about the time the Multiverse-Core message shows up, or abot when the message "World(s) loaded." appears.

Changing entries to false in the config, and then manually running a mvm set to false changes ALL worlds to true in the config. Not just the world I'm editing.

timriker avatar Jul 01 '24 08:07 timriker

Related, 4-year-old issue: https://github.com/Multiverse/Multiverse-Core/issues/2443

ScrapMetalGolem avatar Jul 06 '24 15:07 ScrapMetalGolem

I can reproduce this, and it's quite an issue if you can't set keepSpawnInMemory=false anymore and have a lot of worlds that are all ticking (tested with multiverse-core 4.3.12 and mc paper-1.20.6-148)

cgaffga avatar Jul 10 '24 13:07 cgaffga

In regards to OPs issue, i cant reproduce issue with most world settings when using the /mvm set command. Nor can i reproduce when stopping server and changing config values in worlds.yml.

However can confirm keepSpawnInMemory resets to true.

This has been an issue since 1.20.5 (maybe earlier), but can be individually rectified by adding:

spawn:
  keep-spawn-loaded: false

into the individual worlds paper-world.yml file.

NeverGrowUp avatar Jul 11 '24 01:07 NeverGrowUp

paper-world.yml

What if the server core I am in does not have paper-world.yml?

Not everyone uses the Paper core

MinecraftEarthVillage avatar Jul 11 '24 05:07 MinecraftEarthVillage

We mainly support Paper. There’s no reason to be using Spigot any more

zax71 avatar Jul 11 '24 07:07 zax71

How can I confirm if the keep-spawn-loaded worked or not? I changed keep-spawn-loaded to false in config/paper-world-defaults.yml and edited all the keepSpawnInMemory to false in Multiverse-Core/worlds.yml while the server was stopped.

I restart the server and Multiverse-Core/worlds.yml is re-written with all the keepSpawnInMemory set to true when Multiverse-Core loads all the worlds.

timriker avatar Jul 11 '24 21:07 timriker

In regards to OPs issue, i cant reproduce issue with most world settings when using the /mvm set command. Nor can i reproduce when stopping server and changing config values in worlds.yml.

However can confirm keepSpawnInMemory resets to true.

This has been an issue since 1.20.5 (maybe earlier), but can be individually rectified by adding:

spawn:
  keep-spawn-loaded: false

into the individual worlds paper-world.yml file.

To my knowledge, since version 1.20.5+, the option "keep-spawn-loaded: false" seems to have been removed from Pape

CatTeaA avatar Jul 17 '24 19:07 CatTeaA

This could probably also be achieved with the new spawn chunks gamerule

zax71 avatar Jul 17 '24 22:07 zax71

This could probably also be achieved with the new spawn chunks gamerule

Gamerule keeps resetting after each server restart when using MV.

PovilasLT avatar Jul 20 '24 23:07 PovilasLT

Are you setting it with /mv gamerule?

zax71 avatar Jul 21 '24 12:07 zax71

At the console:

mvrule spawnChunkRadius 0 creative

Does seem to work, however keepSpawnInMemory still shows as true. My guess is that this setting is ignored in 1.20.5+

timriker avatar Jul 21 '24 18:07 timriker

Using mvrule spawnChunkRadius 0 [world] returns a success message, but after a server restart the chunks are loaded again, according to cmi /status (and just by seeing how much memory is used, but that doesn't really qualify as proof).

Same result as using the /gamerule command with multiverse installed.

When I use /gamerule without multiverse installed, I get the desired result: /status reports 0 chunks loaded per world.

ScrapMetalGolem avatar Jul 26 '24 00:07 ScrapMetalGolem

Are you setting it with /mv gamerule?

Same result with both /gamerule and /mv gamerule.

PovilasLT avatar Jul 28 '24 07:07 PovilasLT

道理我都懂😂但是什么时候作者大人能修复啊? 我现在靠着一个自制的插件,在服务器刚刚启动时TPS低于阈值执行/mvm 将区块卸载,但是这会导致每次TPS低于16都会执行一次

MinecraftEarthVillage avatar Jul 29 '24 01:07 MinecraftEarthVillage

are there any news on this issue? Server keeps lagging as all spawns stay loaded and ticking :( any workaround? tx

cgaffga avatar Aug 26 '24 13:08 cgaffga

In regards to OPs issue, i cant reproduce issue with most world settings when using the /mvm set command. Nor can i reproduce when stopping server and changing config values in worlds.yml.

However can confirm keepSpawnInMemory resets to true.

This has been an issue since 1.20.5 (maybe earlier), but can be individually rectified by adding:

spawn:
  keep-spawn-loaded: false

into the individual worlds paper-world.yml file.

Did you see this, as an alternative.

NeverGrowUp avatar Aug 27 '24 08:08 NeverGrowUp

In regards to OPs issue, i cant reproduce issue with most world settings when using the /mvm set command. Nor can i reproduce when stopping server and changing config values in worlds.yml. However can confirm keepSpawnInMemory resets to true. This has been an issue since 1.20.5 (maybe earlier), but can be individually rectified by adding:

spawn:
  keep-spawn-loaded: false

into the individual worlds paper-world.yml file.

Did you see this, as an alternative.

In my setup, at least, this config option seems to be completely ineffective. I'll have a go at using it on a bare server soon and see if it does anything there.

Update: tested it on a server (purpur 2298 1.21.1) with no plugins; the number of chunks loaded in the end (only world I changed the setting for) is only 10, compared to the 49 chunks per world normally, but still it's not zero. Loaded chunks for the nether on this brand new server are only three, and I didn't even change any settings there.

ScrapMetalGolem avatar Aug 27 '24 13:08 ScrapMetalGolem

This is happening on my server as well. /mv gamerule spawnChunkRadius set to 0 solves the loaded chunks issue until a server restart, then resets the property back to 2 automatically. Same with the keepSpawnInMemory property, though the /mvmset doesn't actually even change the property at all. I've edited the actual worlds.yml file while the server is offline, and that also gets instantly reset when the server is restarted. The "keep-spawn-loaded" fix doesn't actually reduce the loaded chunks for me ostensibly at all. In servers with a lot of worlds, this creates a boat load of loaded chunks, and is pushing me over my allocated RAM constantly. Any updates on this/workarounds would be greatly appreciated!

Edit: My stupid duct-tape solution was to run the gamerule command for every world at server start with a plugin that runs commands automatically. It works... but a proper solution would probably be better!

shimloaf avatar Sep 02 '24 07:09 shimloaf

Using /mv modify set keepspawninmemory false world does appear to unload the chunks when I check with /paper chunkinfo

But when I use /mvinfo world it shows keepSpawnInMemory as true. When restarting the server, it's true and loads.

DavidDoesCode avatar Sep 28 '24 22:09 DavidDoesCode

Seems like there is a change in the way it works in 1.20+, there is a new gamerule spawnChunkRadius that you can use. Can people affected by this issue try /mv gamerule spawnChunkRadius 0 <worldname>

benwoo1110 avatar Oct 08 '24 08:10 benwoo1110

This could probably also be achieved with the new spawn chunks gamerule

@benwoo1110 this has already been tried

zax71 avatar Oct 08 '24 17:10 zax71

mvgamerules grief

in the list I see "spawnChunkRadius: 2"

mvgamerule spawnChunkRadius 0 grief [22:44:56 INFO]: Success! Gamerule spawnChunkRadius was set to 0.

mvgamerules shows it changed. Restarting the server sets all world spawnChunkRadius back to 2.

What does spawnRadius do? that's also in the list set to 10.

timriker avatar Oct 08 '24 22:10 timriker

I have report the bug to spigot, let see how it goes https://hub.spigotmc.org/jira/browse/SPIGOT-7915

benwoo1110 avatar Oct 09 '24 14:10 benwoo1110

Update: I have tested the fix in spigot and it works, now is up to paper to update upstream... hopefully soon

benwoo1110 avatar Oct 10 '24 02:10 benwoo1110

Update: I have tested the fix in spigot and it works, now is up to paper to update upstream... hopefully soon

any news on this? Change has not been pushed pushed upstream yet. Does anybody know how long this usually takes?

cgaffga avatar Oct 18 '24 12:10 cgaffga

Update: I have tested the fix in spigot and it works, now is up to paper to update upstream... hopefully soon

is this commit what you were waiting for??

ElTuna avatar Oct 21 '24 01:10 ElTuna

Yep, looks like it's fixed then

benwoo1110 avatar Oct 21 '24 01:10 benwoo1110