aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/config/Config.java4
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/config/annotations/Exclude.java2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/config/Config.java b/src/main/java/cc/polyfrost/oneconfig/config/Config.java
index 6ef9494..4228277 100644
--- a/src/main/java/cc/polyfrost/oneconfig/config/Config.java
+++ b/src/main/java/cc/polyfrost/oneconfig/config/Config.java
@@ -262,6 +262,10 @@ public class Config {
*/
@Override
public boolean shouldSkipClass(Class<?> clazz) {
+ Exclude annotation = clazz.getAnnotation(Exclude.class);
+ if (annotation != null) {
+ return annotation.type() != Exclude.ExcludeType.HUD;
+ }
return false;
}
}
diff --git a/src/main/java/cc/polyfrost/oneconfig/config/annotations/Exclude.java b/src/main/java/cc/polyfrost/oneconfig/config/annotations/Exclude.java
index 6ffd1d9..eddb490 100644
--- a/src/main/java/cc/polyfrost/oneconfig/config/annotations/Exclude.java
+++ b/src/main/java/cc/polyfrost/oneconfig/config/annotations/Exclude.java
@@ -12,7 +12,7 @@ import java.lang.annotation.Target;
* This can be used interchangeably with the transient modifier built into Java.
*/
@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.FIELD)
+@Target({ElementType.FIELD, ElementType.TYPE})
public @interface Exclude {
ExcludeType type() default ExcludeType.ALL;