diff options
author | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-06-29 11:57:33 +0200 |
---|---|---|
committer | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-06-29 11:57:33 +0200 |
commit | 28962efa38a5c259ce532d3b0d1b3d9b5cd79f93 (patch) | |
tree | b6f631da2aa5b52c4aef6451d8512637242bdadd /src/main/java/cc/polyfrost/oneconfig/config | |
parent | 975826256806e19306987e05aa0e59f70d09b0b1 (diff) | |
download | OneConfig-28962efa38a5c259ce532d3b0d1b3d9b5cd79f93.tar.gz OneConfig-28962efa38a5c259ce532d3b0d1b3d9b5cd79f93.tar.bz2 OneConfig-28962efa38a5c259ce532d3b0d1b3d9b5cd79f93.zip |
Revert "unfinished stuff"
This reverts commit 975826256806e19306987e05aa0e59f70d09b0b1.
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/config')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/config/elements/BasicOption.java | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/config/elements/BasicOption.java b/src/main/java/cc/polyfrost/oneconfig/config/elements/BasicOption.java index e3b3b16..86b339b 100644 --- a/src/main/java/cc/polyfrost/oneconfig/config/elements/BasicOption.java +++ b/src/main/java/cc/polyfrost/oneconfig/config/elements/BasicOption.java @@ -2,7 +2,6 @@ package cc.polyfrost.oneconfig.config.elements; import java.lang.reflect.Field; import java.util.ArrayList; -import java.util.HashMap; import java.util.function.Supplier; @SuppressWarnings({"unused"}) @@ -17,8 +16,6 @@ public abstract class BasicOption { private final ArrayList<Runnable> listeners = new ArrayList<>(); private final ArrayList<Supplier<Boolean>> hideConditions = new ArrayList<>(); - private static final HashMap<Field, BasicOption> options = new HashMap<>(); - /** * Initialize option * @@ -34,10 +31,7 @@ public abstract class BasicOption { this.size = size; this.category = category; this.subcategory = subcategory; - if (field != null) { - field.setAccessible(true); - options.put(field, this); - } + if (field != null) field.setAccessible(true); } /** @@ -134,8 +128,4 @@ public abstract class BasicOption { public void addHideCondition(Supplier<Boolean> supplier) { this.hideConditions.add(supplier); } - - public static BasicOption getOption(Field field) { - return options.get(field); - } } |