diff options
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/config/elements')
4 files changed, 1 insertions, 33 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 82d8b31..3394c52 100644 --- a/src/main/java/cc/polyfrost/oneconfig/config/elements/BasicOption.java +++ b/src/main/java/cc/polyfrost/oneconfig/config/elements/BasicOption.java @@ -102,7 +102,7 @@ public abstract class BasicOption { * @param x x position * @param y y position */ - public void drawLast(long vg, int x, int y , InputHandler inputHandler) { + public void drawLast(long vg, int x, int y, InputHandler inputHandler) { } /** @@ -115,20 +115,6 @@ public abstract class BasicOption { } /** - * Reset the field to its default value - * - * @param config The config the field is in - */ - public void reset(Config config) { - Object object = config.getDefault(field); - if (object == null) return; - try { - set(object); - } catch (IllegalAccessException ignored) { - } - } - - /** * @return If the option is enabled, based on the dependencies */ public boolean isEnabled() { diff --git a/src/main/java/cc/polyfrost/oneconfig/config/elements/OptionCategory.java b/src/main/java/cc/polyfrost/oneconfig/config/elements/OptionCategory.java index d3da143..4daefca 100644 --- a/src/main/java/cc/polyfrost/oneconfig/config/elements/OptionCategory.java +++ b/src/main/java/cc/polyfrost/oneconfig/config/elements/OptionCategory.java @@ -32,10 +32,4 @@ import java.util.ArrayList; public class OptionCategory { public final ArrayList<OptionSubcategory> subcategories = new ArrayList<>(); - - public void reset(Config config) { - for (OptionSubcategory subcategory : subcategories) { - subcategory.reset(config); - } - } } diff --git a/src/main/java/cc/polyfrost/oneconfig/config/elements/OptionPage.java b/src/main/java/cc/polyfrost/oneconfig/config/elements/OptionPage.java index 9ac7c14..7a1dfb0 100644 --- a/src/main/java/cc/polyfrost/oneconfig/config/elements/OptionPage.java +++ b/src/main/java/cc/polyfrost/oneconfig/config/elements/OptionPage.java @@ -40,10 +40,4 @@ public class OptionPage { this.name = name; this.mod = mod; } - - public void reset(Config config) { - for (OptionCategory subcategory : categories.values()) { - subcategory.reset(config); - } - } } diff --git a/src/main/java/cc/polyfrost/oneconfig/config/elements/OptionSubcategory.java b/src/main/java/cc/polyfrost/oneconfig/config/elements/OptionSubcategory.java index 282f30f..08c59b8 100644 --- a/src/main/java/cc/polyfrost/oneconfig/config/elements/OptionSubcategory.java +++ b/src/main/java/cc/polyfrost/oneconfig/config/elements/OptionSubcategory.java @@ -132,10 +132,4 @@ public class OptionSubcategory { public String getName() { return name; } - - public void reset(Config config) { - for (BasicOption option : options) { - options.remove(config); - } - } } |