kernitus / BukkitOldCombatMechanics

Spigot plugin to configure combat mechanics for 1.9 onwards
https://www.spigotmc.org/resources/19510/
Mozilla Public License 2.0
179 stars 71 forks source link

Changing plugin version resets the config file #659

Closed LouisDcg closed 1 year ago

LouisDcg commented 1 year ago

Information

Problem Description

When I change the OldCombatMechanics version of the plugin (for example, from 1.11.0 to 1.12.0), the server generates a new config file because it does not matching with config version. Therefore, I have to set all the config again... It was already like that with previous versions of the plugin.

Expected Behaviour

The config should not change, or changing version should change (or reset ?) only the things concerned by the update.

(I don't know if it is normal...)

kernitus commented 1 year ago

This is expected behaviour. From version 1.12.0 of OldCombatMechanics onwards, I added an auto-updater which is capable of transferring the old config values to a new config in-place. However, this needs Spigot 1.18.1 or above as the functionality to do so is not present in older versions. You appear to be running Paper 1.12, meaning the only option is to backup the old config and replace it with a new one.

kernitus commented 1 year ago

@LouisDcg Just letting you know that in test version 149 and above there is now an option to force config updating called force-below-1-18-1-config-upgrade. This will of course remove all comments if enabled in version below Spigot 1.18.1 when the config is upgraded.