2022-05-06 18:57:02 +02:00
|
|
|
package com.falsepattern.lib.config;
|
|
|
|
|
|
2022-05-06 23:53:11 +02:00
|
|
|
import com.falsepattern.lib.StableAPI;
|
2022-06-08 16:01:06 +02:00
|
|
|
import java.lang.annotation.Documented;
|
|
|
|
|
import java.lang.annotation.ElementType;
|
|
|
|
|
import java.lang.annotation.Retention;
|
|
|
|
|
import java.lang.annotation.RetentionPolicy;
|
|
|
|
|
import java.lang.annotation.Target;
|
2022-05-06 23:53:11 +02:00
|
|
|
|
|
|
|
|
@Documented
|
2022-05-06 18:57:02 +02:00
|
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
|
|
|
@Target(ElementType.TYPE)
|
2022-05-06 23:53:11 +02:00
|
|
|
@StableAPI(since = "0.6.0")
|
2022-05-06 18:57:02 +02:00
|
|
|
public @interface Config {
|
|
|
|
|
/**
|
|
|
|
|
* The mod id that this configuration is associated with.
|
|
|
|
|
*/
|
|
|
|
|
String modid();
|
|
|
|
|
|
|
|
|
|
/**
|
2022-05-07 16:43:34 +02:00
|
|
|
* Root element category, defaults to "general". You must not specify an empty string.
|
2022-05-06 18:57:02 +02:00
|
|
|
*/
|
|
|
|
|
String category() default "general";
|
|
|
|
|
|
|
|
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
|
|
|
@Target({ElementType.FIELD, ElementType.TYPE})
|
|
|
|
|
@interface LangKey {
|
|
|
|
|
String value();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
|
|
|
@Target(ElementType.FIELD)
|
|
|
|
|
@interface Comment {
|
|
|
|
|
String[] value();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
|
|
|
@Target(ElementType.FIELD)
|
2022-06-08 16:01:06 +02:00
|
|
|
@interface Ignore {
|
|
|
|
|
}
|
2022-05-06 18:57:02 +02:00
|
|
|
|
2022-05-07 01:33:04 +02:00
|
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
|
|
|
@Target(ElementType.FIELD)
|
|
|
|
|
@interface DefaultBoolean {
|
|
|
|
|
boolean value();
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-06 18:57:02 +02:00
|
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
|
|
|
@Target(ElementType.FIELD)
|
|
|
|
|
@interface RangeInt {
|
|
|
|
|
int min() default Integer.MIN_VALUE;
|
|
|
|
|
|
|
|
|
|
int max() default Integer.MAX_VALUE;
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-06 23:48:24 +02:00
|
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
|
|
|
@Target(ElementType.FIELD)
|
|
|
|
|
@interface DefaultInt {
|
2022-05-07 01:33:04 +02:00
|
|
|
int value();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
|
|
|
@Target(ElementType.FIELD)
|
|
|
|
|
@interface RangeFloat {
|
|
|
|
|
float min() default Float.MIN_VALUE;
|
|
|
|
|
|
|
|
|
|
float max() default Float.MAX_VALUE;
|
2022-05-06 23:48:24 +02:00
|
|
|
}
|
|
|
|
|
|
2022-05-06 18:57:02 +02:00
|
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
|
|
|
@Target(ElementType.FIELD)
|
2022-05-07 01:33:04 +02:00
|
|
|
@interface DefaultFloat {
|
|
|
|
|
float value();
|
|
|
|
|
}
|
2022-05-06 18:57:02 +02:00
|
|
|
|
2022-05-07 01:33:04 +02:00
|
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
|
|
|
@Target(ElementType.FIELD)
|
|
|
|
|
@interface DefaultString {
|
|
|
|
|
String value();
|
2022-05-06 18:57:02 +02:00
|
|
|
}
|
|
|
|
|
|
2022-05-06 23:48:24 +02:00
|
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
|
|
|
@Target(ElementType.FIELD)
|
2022-05-07 01:33:04 +02:00
|
|
|
@interface Pattern {
|
|
|
|
|
String value();
|
2022-05-06 23:48:24 +02:00
|
|
|
}
|
|
|
|
|
|
2022-05-07 11:45:57 +02:00
|
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
|
|
|
@Target(ElementType.FIELD)
|
|
|
|
|
@interface DefaultEnum {
|
|
|
|
|
String value();
|
|
|
|
|
}
|
|
|
|
|
|
2022-06-07 21:10:21 -04:00
|
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
|
|
|
@Target(ElementType.FIELD)
|
|
|
|
|
@interface DefaultStringList {
|
|
|
|
|
String[] value();
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-06 18:57:02 +02:00
|
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
|
|
|
@Target(ElementType.FIELD)
|
|
|
|
|
@interface Name {
|
|
|
|
|
String value();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
|
|
|
@Target({ElementType.FIELD, ElementType.TYPE})
|
2022-06-08 16:01:06 +02:00
|
|
|
@interface RequiresMcRestart {
|
|
|
|
|
}
|
2022-05-06 18:57:02 +02:00
|
|
|
|
|
|
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
|
|
|
@Target({ElementType.FIELD, ElementType.TYPE})
|
2022-06-08 16:01:06 +02:00
|
|
|
@interface RequiresWorldRestart {
|
|
|
|
|
}
|
2022-05-06 18:57:02 +02:00
|
|
|
}
|