diff --git a/src/main/java/eu/m724/tweaks/TweaksConfig.java b/src/main/java/eu/m724/tweaks/TweaksConfig.java index b835162..57530df 100644 --- a/src/main/java/eu/m724/tweaks/TweaksConfig.java +++ b/src/main/java/eu/m724/tweaks/TweaksConfig.java @@ -59,7 +59,7 @@ public record TweaksConfig( Map knockbackModifiers ) { - public static final int CONFIG_VERSION = 1; + public static final int CONFIG_VERSION = 2; private static TweaksConfig config; public static TweaksConfig getConfig() { @@ -72,10 +72,11 @@ public record TweaksConfig( int configVersion = config.getInt("magic number don't modify this", 0); RuntimeException exception = new RuntimeException("Config version is %d, expected %d".formatted(configVersion, CONFIG_VERSION)); + if (configVersion == 0) { throw exception; } else if (configVersion > CONFIG_VERSION) { - throw new RuntimeException("Please follow update instructions", exception); + throw new RuntimeException("Please follow update instructions https://www.spigotmc.org/resources/tweaks724.121057/updates", exception); } else if (configVersion < CONFIG_VERSION) { throw new RuntimeException("Did you downgrade the plugin? Remove config.yml and let the plugin re-create it", exception); } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 6c0844a..cd0a604 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -120,4 +120,4 @@ knockback: # Finally, thank you for downloading Tweaks724, I hope you enjoy! # Don't modify unless told to -magic number don't modify this: 1 \ No newline at end of file +magic number don't modify this: 2 \ No newline at end of file