isXander / YetAnotherConfigLib

YetAnotherConfigLib (yacl) is just that. A builder-based configuration library for Minecraft.
GNU Lesser General Public License v3.0
96 stars 36 forks source link

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

Closed ghost closed 10 months ago

ghost commented 10 months ago

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.

isXander commented 10 months ago

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.

qtlunya commented 10 months ago

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