diff options
| author | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-04-30 17:05:10 +0200 |
|---|---|---|
| committer | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-04-30 17:05:10 +0200 |
| commit | 0283a6618360ed473da42c1144da5b44146155bb (patch) | |
| tree | 7002057b340df87e20989473a7f370aa89f5ad44 /src/main/java/io/polyfrost/oneconfig/config/annotations | |
| parent | 026aebb4748747f08d5088947056a75740550b17 (diff) | |
| download | OneConfig-0283a6618360ed473da42c1144da5b44146155bb.tar.gz OneConfig-0283a6618360ed473da42c1144da5b44146155bb.tar.bz2 OneConfig-0283a6618360ed473da42c1144da5b44146155bb.zip | |
more config system stuff
Diffstat (limited to 'src/main/java/io/polyfrost/oneconfig/config/annotations')
| -rw-r--r-- | src/main/java/io/polyfrost/oneconfig/config/annotations/ConfigPage.java | 32 | ||||
| -rw-r--r-- | src/main/java/io/polyfrost/oneconfig/config/annotations/Option.java | 10 |
2 files changed, 37 insertions, 5 deletions
diff --git a/src/main/java/io/polyfrost/oneconfig/config/annotations/ConfigPage.java b/src/main/java/io/polyfrost/oneconfig/config/annotations/ConfigPage.java new file mode 100644 index 0000000..fecd438 --- /dev/null +++ b/src/main/java/io/polyfrost/oneconfig/config/annotations/ConfigPage.java @@ -0,0 +1,32 @@ +package io.polyfrost.oneconfig.config.annotations; + +import io.polyfrost.oneconfig.config.data.PageLocation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface ConfigPage { + /** + * The name of the page that will be displayed to the user + */ + String name(); + + /** + * If the page button is at the top or bottem of the page + */ + PageLocation location(); + + /** + * The description of the page that will be displayed to the user + */ + String description() default ""; + + /** + * The category of the page + */ + String category() default "general"; +} diff --git a/src/main/java/io/polyfrost/oneconfig/config/annotations/Option.java b/src/main/java/io/polyfrost/oneconfig/config/annotations/Option.java index b7bcf4f..fe61a02 100644 --- a/src/main/java/io/polyfrost/oneconfig/config/annotations/Option.java +++ b/src/main/java/io/polyfrost/oneconfig/config/annotations/Option.java @@ -17,11 +17,6 @@ public @interface Option { String name(); /** - * The description of the page that will be displayed to the user - */ - String description() default ""; - - /** * The type of the option */ OptionType type(); @@ -51,6 +46,11 @@ public @interface Option { int size() default 1; /** + * The placeholder in the text field + */ + String placeholder() default ""; + + /** * If the text field is secure or not */ boolean secure() default false; |
