@Retention(value=RUNTIME)
@Target(value=METHOD)
public static @interface BetterConfig.AfterRead
A method annotated with @AfterRead will be called after the corresponding .cfg file is read,
but before those entries are synced to the class's fields. This can be used to migrate old config files
to new versions.
Example usage:
@BetterConfig.AfterRead
public static <T extends IConfigContext<T>> void afterConfigRead(IConfigCategory<T> config, T context, @Nullable ArtifactVersion version) {
// ...
}
The readVersion parameter contains the in-file (old) version for this BetterConfig class.
The in-code (new) version to compare should be accessible directly through your code.