Closed richardpickett closed 8 years ago
I figured out a work-around.
In retrospect I'm guessing since I'm running a dev PocketMine it's not cleaning up correctly at the end and doesn't call SimpleWarp to tell it to exit/save cleanly.
I was assuming that when I created a warp it would automatically be written out to the warp.yaml, but when I took a peek at config.yml I found the default storage-mode was set to 0, which means to write them on exit (which wasn't happening correctly).
I changed it to 1, restarted, warps started getting saved.
Change the default in config.yml to 1. I can't think of any condition where someone would want 0, but I can see why someone would want 1 or 2. While 2 is a "safer" default between the two, I think 1 would be more commonly used.
Thanks for the documentation of the workaround. It defaults to 0
because that is the least work for the filesystem and for the processor. It is a marginal difference, but they are ordered from fastest to slowest.
Maybe instead of hooking server-exit, 0 should hook save-world. Then the overhead is related to saving the world (expected), and the admin can save the warps on-demand instead of having to shut the server down.
@richardpickett That is a good idea. I will create an issue for that.
Following up on this, I have done two things
If you want to save warps in mode 0, use the reload
command.
And the plugins/SimpleWarp/warps.yml is "empty":
# cat /home/minecraftpe/plugins/SimpleWarp/warps.yml
--- []
...