aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/internal
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/internal')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/internal/config/Preferences.java3
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/internal/config/core/KeyBindHandler.java1
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/internal/config/Preferences.java b/src/main/java/cc/polyfrost/oneconfig/internal/config/Preferences.java
index 10c14a8..ffb4b62 100644
--- a/src/main/java/cc/polyfrost/oneconfig/internal/config/Preferences.java
+++ b/src/main/java/cc/polyfrost/oneconfig/internal/config/Preferences.java
@@ -17,9 +17,10 @@ public class Preferences extends InternalConfig {
name = "OneConfig Keybind",
size = 2
)
- public static OneKeyBind oneConfigKeyBind = new OneKeyBind(() -> GuiUtils.displayScreen(OneConfigGui.create()), UKeyboard.KEY_RSHIFT);
+ public static OneKeyBind oneConfigKeyBind = new OneKeyBind(UKeyboard.KEY_RSHIFT);
public Preferences() {
super("Preferences", "Preferences.json");
+ registerKeyBind(oneConfigKeyBind, () -> GuiUtils.displayScreen(OneConfigGui.create()));
}
}
diff --git a/src/main/java/cc/polyfrost/oneconfig/internal/config/core/KeyBindHandler.java b/src/main/java/cc/polyfrost/oneconfig/internal/config/core/KeyBindHandler.java
index 6829ae4..e285b51 100644
--- a/src/main/java/cc/polyfrost/oneconfig/internal/config/core/KeyBindHandler.java
+++ b/src/main/java/cc/polyfrost/oneconfig/internal/config/core/KeyBindHandler.java
@@ -18,7 +18,6 @@ public class KeyBindHandler {
}
public void addKeyBind(OneKeyBind keyBind) {
- if (keyBind == null) return;
keyBinds.add(keyBind);
}