YetAnotherConfigLib

YetAnotherConfigLib

13M Downloads

Unsaved changes are lost if you are teleported to another server while editing config

0xallie opened this issue ยท 2 comments

commented

Steps to reproduce:

  1. Connect to Hypixel
  2. Open the settings screen of a mod using YACL
  3. Change some options, but don't save
  4. Wait a few minutes
  5. When you get teleported to another server for being AFK, the settings screen closes and all unsaved changes are lost without a warning.

Obviously you can also test this on a different server, but Hypixel is an easy test case. I imagine getting teleported to the Nether/End on single-server instances would also have the same effect.

Minecraft 1.20.2, Fabric.

commented

Because nothing saves till you hit save. If you get teleported then the screen changes and you lose YACL. There is no way to get around this sorry. You just need to make sure whenever you start changing settings you're doing it somewhere that this won't happen.

commented

Couldn't you save changes to a temporary file and offer to restore them the next time the user opens the config screen?