diff options
author | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-04-26 20:35:35 +0200 |
---|---|---|
committer | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-04-26 20:35:35 +0200 |
commit | aad5111d45a66d943f0bcbe885ccb28249441d11 (patch) | |
tree | 94bcedd85c1725a7a813185b0a931ffc3eb215fd /src/main/java/io/polyfrost/oneconfig/config/data | |
parent | 5eb52cdd6ce2e65be7eefecfea7cfdb63404f481 (diff) | |
download | OneConfig-aad5111d45a66d943f0bcbe885ccb28249441d11.tar.gz OneConfig-aad5111d45a66d943f0bcbe885ccb28249441d11.tar.bz2 OneConfig-aad5111d45a66d943f0bcbe885ccb28249441d11.zip |
config system rewrite
Diffstat (limited to 'src/main/java/io/polyfrost/oneconfig/config/data')
-rw-r--r-- | src/main/java/io/polyfrost/oneconfig/config/data/Mod.java (renamed from src/main/java/io/polyfrost/oneconfig/config/data/ModData.java) | 5 | ||||
-rw-r--r-- | src/main/java/io/polyfrost/oneconfig/config/data/OptionPage.java | 20 | ||||
-rw-r--r-- | src/main/java/io/polyfrost/oneconfig/config/data/OptionType.java | 6 |
3 files changed, 29 insertions, 2 deletions
diff --git a/src/main/java/io/polyfrost/oneconfig/config/data/ModData.java b/src/main/java/io/polyfrost/oneconfig/config/data/Mod.java index c5e6633..435fb32 100644 --- a/src/main/java/io/polyfrost/oneconfig/config/data/ModData.java +++ b/src/main/java/io/polyfrost/oneconfig/config/data/Mod.java @@ -2,12 +2,13 @@ package io.polyfrost.oneconfig.config.data; import io.polyfrost.oneconfig.config.interfaces.Config; -public class ModData { +public class Mod { public final String name; public final ModType modType; public final String creator; public final String version; public Config config; + public OptionPage defaultPage = new OptionPage(""); /** * @param name Friendly name of the mod @@ -15,7 +16,7 @@ public class ModData { * @param creator Creator of the mod * @param version Version of the mod */ - public ModData(String name, ModType modType, String creator, String version) { + public Mod(String name, ModType modType, String creator, String version) { this.name = name; this.modType = modType; this.creator = creator; diff --git a/src/main/java/io/polyfrost/oneconfig/config/data/OptionPage.java b/src/main/java/io/polyfrost/oneconfig/config/data/OptionPage.java new file mode 100644 index 0000000..021786d --- /dev/null +++ b/src/main/java/io/polyfrost/oneconfig/config/data/OptionPage.java @@ -0,0 +1,20 @@ +package io.polyfrost.oneconfig.config.data; + +import io.polyfrost.oneconfig.config.interfaces.BasicOption; + +import java.util.ArrayList; +import java.util.HashMap; + +public class OptionPage { + public final String name; + /** + * Depth 1 = categories + * Depth 2 = subcategories + * Depth 3 = list of options + */ + public final HashMap<String, HashMap<String, ArrayList<BasicOption>>> categories = new HashMap<>(); + + public OptionPage(String name) { + this.name = name; + } +} diff --git a/src/main/java/io/polyfrost/oneconfig/config/data/OptionType.java b/src/main/java/io/polyfrost/oneconfig/config/data/OptionType.java new file mode 100644 index 0000000..22c92c0 --- /dev/null +++ b/src/main/java/io/polyfrost/oneconfig/config/data/OptionType.java @@ -0,0 +1,6 @@ +package io.polyfrost.oneconfig.config.data; + +public enum OptionType { + PAGE, + SWITCH +} |