aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/config/compatibility
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2022-05-27 21:31:59 +0700
committerWyvest <45589059+Wyvest@users.noreply.github.com>2022-05-27 21:31:59 +0700
commitab2dd02145d5f89455a74605dd953888761d0ddb (patch)
treed8a9e909798a9bf84e876319c1fdea758d9c5963 /src/main/java/cc/polyfrost/oneconfig/config/compatibility
parent2de9cec78992b9589c13ca24b911a1d8ce381c75 (diff)
downloadOneConfig-ab2dd02145d5f89455a74605dd953888761d0ddb.tar.gz
OneConfig-ab2dd02145d5f89455a74605dd953888761d0ddb.tar.bz2
OneConfig-ab2dd02145d5f89455a74605dd953888761d0ddb.zip
javadoc a lot of stuff + reorganize
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/config/compatibility')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/config/compatibility/VigilanceConfig.java8
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/config/compatibility/VigilantAccessor.java4
2 files changed, 10 insertions, 2 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/config/compatibility/VigilanceConfig.java b/src/main/java/cc/polyfrost/oneconfig/config/compatibility/VigilanceConfig.java
index f31b609..0fbfa62 100644
--- a/src/main/java/cc/polyfrost/oneconfig/config/compatibility/VigilanceConfig.java
+++ b/src/main/java/cc/polyfrost/oneconfig/config/compatibility/VigilanceConfig.java
@@ -20,6 +20,10 @@ import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Objects;
+/**
+ * This class is used to convert the Vigilance config to the new config system.
+ * It is not meant to be used outside the config system.
+ */
public class VigilanceConfig extends Config {
public final Vigilant vigilant;
@@ -133,7 +137,7 @@ public class VigilanceConfig extends Config {
PropertyAttributesExt.class.getDeclaredField("i18nName").setAccessible(true);
return I18n.format((String) PropertyAttributesExt.class.getDeclaredField("i18nName").get(ext));
} catch (IllegalAccessException | NoSuchFieldException e) {
- return ext.getName();
+ return ext.getName();
}
}
@@ -151,7 +155,7 @@ public class VigilanceConfig extends Config {
PropertyAttributesExt.class.getDeclaredField("i18nSubcategory").setAccessible(true);
return I18n.format((String) PropertyAttributesExt.class.getDeclaredField("i18nSubcategory").get(ext));
} catch (IllegalAccessException | NoSuchFieldException e) {
- return ext.getSubcategory();
+ return ext.getSubcategory();
}
}
diff --git a/src/main/java/cc/polyfrost/oneconfig/config/compatibility/VigilantAccessor.java b/src/main/java/cc/polyfrost/oneconfig/config/compatibility/VigilantAccessor.java
index 4c79a21..ca2b1da 100644
--- a/src/main/java/cc/polyfrost/oneconfig/config/compatibility/VigilantAccessor.java
+++ b/src/main/java/cc/polyfrost/oneconfig/config/compatibility/VigilantAccessor.java
@@ -2,6 +2,10 @@ package cc.polyfrost.oneconfig.config.compatibility;
import gg.essential.vigilance.data.PropertyCollector;
+/**
+ * Interface for accessing the {@link PropertyCollector} in a Vigilant config.
+ * <p>Not recommended for non-internal OneConfig usage, as Systemless will get really angry at us</p>
+ */
public interface VigilantAccessor {
PropertyCollector getPropertyCollector();
}