aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java91
1 files changed, 50 insertions, 41 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java b/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java
index 3e1c995..e09f324 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java
@@ -12,48 +12,57 @@ import org.apache.commons.lang3.StringUtils;
public class Commands {
- private static final SimpleCommand.ProcessCommandRunnable settingsRunnable = new SimpleCommand.ProcessCommandRunnable() {
- public void processCommand(ICommandSender sender, String[] args) {
- if (args.length > 0) {
- SkyblockHud.screenToOpen =
- new GuiScreenElementWrapper(
- new SBHConfigEditor(SkyblockHud.config, StringUtils.join(args, " "))
- );
- } else {
- SkyblockHud.screenToOpen =
- new GuiScreenElementWrapper(new SBHConfigEditor(SkyblockHud.config));
- }
- }
- };
+ private static final SimpleCommand.ProcessCommandRunnable settingsRunnable = new SimpleCommand.ProcessCommandRunnable() {
+ public void processCommand(ICommandSender sender, String[] args) {
+ if (args.length > 0) {
+ SkyblockHud.screenToOpen =
+ new GuiScreenElementWrapper(
+ new SBHConfigEditor(
+ SkyblockHud.config,
+ StringUtils.join(args, " ")
+ )
+ );
+ } else {
+ SkyblockHud.screenToOpen =
+ new GuiScreenElementWrapper(
+ new SBHConfigEditor(SkyblockHud.config)
+ );
+ }
+ }
+ };
- private static final SimpleCommand settingsCommand = new SimpleCommand(
- "sbh",
- settingsRunnable
- );
- private static final SimpleCommand settingsCommand2 = new SimpleCommand(
- "sbhsettings",
- settingsRunnable
- );
- private static final SimpleCommand settingsCommand3 = new SimpleCommand(
- "sbhud",
- settingsRunnable
- );
+ private static final SimpleCommand settingsCommand = new SimpleCommand(
+ "sbh",
+ settingsRunnable
+ );
+ private static final SimpleCommand settingsCommand2 = new SimpleCommand(
+ "sbhsettings",
+ settingsRunnable
+ );
+ private static final SimpleCommand settingsCommand3 = new SimpleCommand(
+ "sbhud",
+ settingsRunnable
+ );
- private static final SimpleCommand mapCommand = new SimpleCommand(
- "sbhmap",
- new SimpleCommand.ProcessCommandRunnable() {
- public void processCommand(ICommandSender sender, String[] args) {
- if (
- LocationHandler.getCurrentLocation().getCategory().getMap() != null
- ) SkyblockHud.screenToOpen = new MapHandler.MapScreen();
- }
- }
- );
+ private static final SimpleCommand mapCommand = new SimpleCommand(
+ "sbhmap",
+ new SimpleCommand.ProcessCommandRunnable() {
+ public void processCommand(ICommandSender sender, String[] args) {
+ if (
+ LocationHandler
+ .getCurrentLocation()
+ .getCategory()
+ .getMap() !=
+ null
+ ) SkyblockHud.screenToOpen = new MapHandler.MapScreen();
+ }
+ }
+ );
- public static void init() {
- ClientCommandHandler.instance.registerCommand(settingsCommand);
- ClientCommandHandler.instance.registerCommand(settingsCommand2);
- ClientCommandHandler.instance.registerCommand(settingsCommand3);
- ClientCommandHandler.instance.registerCommand(mapCommand);
- }
+ public static void init() {
+ ClientCommandHandler.instance.registerCommand(settingsCommand);
+ ClientCommandHandler.instance.registerCommand(settingsCommand2);
+ ClientCommandHandler.instance.registerCommand(settingsCommand3);
+ ClientCommandHandler.instance.registerCommand(mapCommand);
+ }
}