From 2159b8d6cc7e0de418062fecb8e57244184e8820 Mon Sep 17 00:00:00 2001 From: nextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com> Date: Mon, 25 Jul 2022 11:58:48 +0100 Subject: additional config migrators (#64) * json migrator * *coughs* * casting issues fix * cfg implementation and a couple fixes * reformat * cast fix + javadoc * make the json migrator useful, double parsing, separate annotations --- .../polyfrost/oneconfig/config/migration/CfgName.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/main/java/cc/polyfrost/oneconfig/config/migration/CfgName.java (limited to 'src/main/java/cc/polyfrost/oneconfig/config/migration/CfgName.java') diff --git a/src/main/java/cc/polyfrost/oneconfig/config/migration/CfgName.java b/src/main/java/cc/polyfrost/oneconfig/config/migration/CfgName.java new file mode 100644 index 0000000..560c374 --- /dev/null +++ b/src/main/java/cc/polyfrost/oneconfig/config/migration/CfgName.java @@ -0,0 +1,19 @@ +package cc.polyfrost.oneconfig.config.migration; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + *
{@code public @interface CfgName}
+ * This interface is used to specify a previous name for an element.
+ * For example, if you changed the name of a variable when you migrated/updated your mod to use OneConfig, + * you can use this annotation to specify the previous name so that the Migrator can grab it. + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface CfgName { + String name(); + String category(); +} -- cgit