CitizensDev/Citizens — Issue #323: Citizen Reload saves over files
Author: tustin2121
Created: 2011-10-21 17:08:25+00:00
State: open

The "/citizen reload" command has a nasty habit of saving all of its files before loading the files back in. This makes editing the .yml files pointless, especially when trying to clean up the files because loading the files throws exceptions.

**Steps to reproduce**:
1. Make a citizen or two in-game.
2. Call /citizen save to save the files
3. Open the newly updated npc-profiles.yml file
4. Remove a citizen entry (assuming the citizen is corrupted in some way)
5. Back in the game or in the console, type /citizen reload

**Expected outcome**:
The plugin loads up the newly edited file and one of the citizens is gone (because it was deleted from the file)

**Actual outcome**:
The plugin saves over the edited file, as if it was using /citizen save, and then reloads the file it just saved over (making the reload pointless), and the corrupted citizen remains.

The expected outcome is the outcome for many other plugins, which is why it is expected. Further, the only way right now to clean up the npc-profiles.yml file, _without_ shutting down the server, is to disable the plugin (rename Citizens.jar to not be a .jar), call /reload on the server, edit the file, enable the plugin (rename it back to a .jar file), and then call /reload again. Not pleasant to do.