aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/amod/commands/Commands.java
diff options
context:
space:
mode:
authorLorenz <ESs95s3P5z8Pheb>2022-07-14 11:26:34 +0200
committerLorenz <ESs95s3P5z8Pheb>2022-07-14 11:26:34 +0200
commitc65416e03ce0791c4a99e9bdfc18c0fa0863028a (patch)
tree653e7e8bbfce0cb2f25592fd48b531f863c3575e /src/main/java/com/thatgravyboat/amod/commands/Commands.java
parentb2108f37f551fba5cb43f4919d69e5db7bb1e44c (diff)
downloadskyhanni-c65416e03ce0791c4a99e9bdfc18c0fa0863028a.tar.gz
skyhanni-c65416e03ce0791c4a99e9bdfc18c0fa0863028a.tar.bz2
skyhanni-c65416e03ce0791c4a99e9bdfc18c0fa0863028a.zip
remove old sbh/skyblockhud code
Diffstat (limited to 'src/main/java/com/thatgravyboat/amod/commands/Commands.java')
-rw-r--r--src/main/java/com/thatgravyboat/amod/commands/Commands.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/main/java/com/thatgravyboat/amod/commands/Commands.java b/src/main/java/com/thatgravyboat/amod/commands/Commands.java
new file mode 100644
index 000000000..97188933a
--- /dev/null
+++ b/src/main/java/com/thatgravyboat/amod/commands/Commands.java
@@ -0,0 +1,31 @@
+package com.thatgravyboat.amod.commands;
+
+import at.lorenz.mod.LorenzMod;
+import com.thatgravyboat.amod.config.ConfigEditor;
+import com.thatgravyboat.amod.core.GuiScreenElementWrapper;
+import net.minecraft.command.ICommandSender;
+import net.minecraftforge.client.ClientCommandHandler;
+import org.apache.commons.lang3.StringUtils;
+
+public class Commands {
+
+ private static final boolean devMode = false;
+
+ private static final SimpleCommand.ProcessCommandRunnable settingsRunnable = new SimpleCommand.ProcessCommandRunnable() {
+ public void processCommand(ICommandSender sender, String[] args) {
+ if (args.length > 0) {
+ LorenzMod.screenToOpen = new GuiScreenElementWrapper(new ConfigEditor(LorenzMod.feature, StringUtils.join(args, " ")));
+ } else {
+ LorenzMod.screenToOpen = new GuiScreenElementWrapper(new ConfigEditor(LorenzMod.feature));
+ }
+ }
+ };
+
+ private static final SimpleCommand settingsCommand = new SimpleCommand("lm", settingsRunnable);
+ private static final SimpleCommand settingsCommand2 = new SimpleCommand("lorenzmod", settingsRunnable);
+
+ public static void init() {
+ ClientCommandHandler.instance.registerCommand(settingsCommand);
+ ClientCommandHandler.instance.registerCommand(settingsCommand2);
+ }
+}