Updating deletes previously set homes
blackfox1482 opened this issue ยท 5 comments
Hello, I love using this plugin on my server, however when I tried updating to the newest version of the plugin it deletes all previously set homes. I am not sure what the problem is but I was hoping you would be able to help. I am currently still using the 1.13 version of the plugin. Thanks!
Hi there,
The issue is because of bugs in the previous code which resulted in a malformed configuration file. Due to this I had to rework the way the configuration file got created and written out to whenever someone saved a new home. Unfortunately because of this I was unable to safely reuse the old configurations for this new version of the plugin. Therefore the only way I can see to fix this problem is as follows:
-
Navigate to your bukkit servers plugin directory, and from there into the folder "SetHomes". In your case, and the same goes for anybody else who updated, there should be three files within this folder, "sethomes.yml", "sethomes_desc.yml", and "config.yml". The two files "sethomes.yml" and "sethomes_desc.yml" are leftover from the previous version of the plugin. These will contain all the information regarding the old homes before the update. The file "config.yml" contains all the new homes that have been created after the update.
- NOTE: BACKUP THIS FOLDER IN CASE ANY MISTAKES ARE MADE DURING THE PROCESS!!!
-
Open up "sethomes.yml", as we will need to clean up any errors that the previous version of the plugin may have created due to its bugs. From here we need to delete any items that fit under the following criteria:
-
You will need to get the descriptions from within "sethomes_desc.yml" and move them to the correct location in "sethomes.yml". Make sure that you match the player UUID which looks something like (9b40d35c-908a-43ee-9e07-8e97d16e3b99), and is used to identify a specific player, as well as the home name when pasting the description into its proper indented location.
-
Following the same process as step three, where you have to match the player UUID. Copy over any home that does not already have a name under the corresponding UUID into "config.yml"
- Anything outlined in blue must match prior to pasting in the item outlined in green.
- If all of the steps were followed properly then you should end up with an updated version of "config.yml" that looks something like this: updated_config_yml. Then all of the old homes that were not malformed by the bug in the previous version of this plugin should be restored after you save "config.yml" and restart the server.
- Anything outlined in blue must match prior to pasting in the item outlined in green.
Best of luck and I am so sorry for the inconvenience,
Xquiset
I am sad that this is how it has to be fixed. I have to delete 4447 things just for *id---- and I have to do this by hand no shortcuts.
I very sorry that this is the only option available, and to hear of the significant work it has burdened you with. In terms of the shortcuts my best suggestion would be to find a nice text editor that lets you use "regular expressions" in its find and replace functionality. I'm not here to give a tutorial on how to use "regular expressions", but I think if you can figure that out then it will significantly cut down the amount of work that you would have to do by hand. For example the text editor I am using in the screenshots above is called "Sublime 3" and it allows you to use "regular expressions" in its find and replace.
Again, so sorry for the inconvenience,
Xquiset
No worries, I understand that you didn't for see this happening. It is all good now I spent the last few days just working on it and it is all done now yay! :)