From 28962efa38a5c259ce532d3b0d1b3d9b5cd79f93 Mon Sep 17 00:00:00 2001 From: DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> Date: Wed, 29 Jun 2022 11:57:33 +0200 Subject: Revert "unfinished stuff" This reverts commit 975826256806e19306987e05aa0e59f70d09b0b1. --- .../cc/polyfrost/oneconfig/config/elements/BasicOption.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src/main/java/cc/polyfrost/oneconfig/config') 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 listeners = new ArrayList<>(); private final ArrayList> hideConditions = new ArrayList<>(); - private static final HashMap 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 supplier) { this.hideConditions.add(supplier); } - - public static BasicOption getOption(Field field) { - return options.get(field); - } } -- cgit