diff options
author | TymanWasTaken <tyman@tyman.tech> | 2021-07-06 17:20:49 -0400 |
---|---|---|
committer | TymanWasTaken <tyman@tyman.tech> | 2021-07-06 17:20:49 -0400 |
commit | c04ca523f9fb9f7adefa74587db61f76deeae9f0 (patch) | |
tree | f148e7bcd9105813d3fe781badcb2cf3892712fd /src/main/java/com/thatgravyboat/skyblockhud/commands | |
parent | a8e475fa0a7977f64f072548459d592274169d66 (diff) | |
download | SkyblockHud-Death-Defied-c04ca523f9fb9f7adefa74587db61f76deeae9f0.tar.gz SkyblockHud-Death-Defied-c04ca523f9fb9f7adefa74587db61f76deeae9f0.tar.bz2 SkyblockHud-Death-Defied-c04ca523f9fb9f7adefa74587db61f76deeae9f0.zip |
Increase line width
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/commands')
-rw-r--r-- | src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java | 36 | ||||
-rw-r--r-- | src/main/java/com/thatgravyboat/skyblockhud/commands/SimpleCommand.java | 32 |
2 files changed, 13 insertions, 55 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java b/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java index e09f324..8304906 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java @@ -16,45 +16,23 @@ public class Commands { public void processCommand(ICommandSender sender, String[] args) { if (args.length > 0) { SkyblockHud.screenToOpen = - new GuiScreenElementWrapper( - new SBHConfigEditor( - SkyblockHud.config, - StringUtils.join(args, " ") - ) - ); + new GuiScreenElementWrapper(new SBHConfigEditor(SkyblockHud.config, StringUtils.join(args, " "))); } else { - SkyblockHud.screenToOpen = - new GuiScreenElementWrapper( - new SBHConfigEditor(SkyblockHud.config) - ); + 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(); + if (LocationHandler.getCurrentLocation().getCategory().getMap() != null) SkyblockHud.screenToOpen = + new MapHandler.MapScreen(); } } ); diff --git a/src/main/java/com/thatgravyboat/skyblockhud/commands/SimpleCommand.java b/src/main/java/com/thatgravyboat/skyblockhud/commands/SimpleCommand.java index 358ebe0..db23b8e 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/commands/SimpleCommand.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/commands/SimpleCommand.java @@ -20,11 +20,7 @@ public class SimpleCommand extends CommandBase { this.runnable = runnable; } - public SimpleCommand( - String commandName, - ProcessCommandRunnable runnable, - TabCompleteRunnable tabRunnable - ) { + public SimpleCommand(String commandName, ProcessCommandRunnable runnable, TabCompleteRunnable tabRunnable) { this.commandName = commandName; this.runnable = runnable; this.tabRunnable = tabRunnable; @@ -32,19 +28,12 @@ public class SimpleCommand extends CommandBase { public abstract static class ProcessCommandRunnable { - public abstract void processCommand( - ICommandSender sender, - String[] args - ); + public abstract void processCommand(ICommandSender sender, String[] args); } public abstract static class TabCompleteRunnable { - public abstract List<String> tabComplete( - ICommandSender sender, - String[] args, - BlockPos pos - ); + public abstract List<String> tabComplete(ICommandSender sender, String[] args, BlockPos pos); } public boolean canCommandSenderUseCommand(ICommandSender sender) { @@ -59,21 +48,12 @@ public class SimpleCommand extends CommandBase { return "/" + commandName; } - public void processCommand(ICommandSender sender, String[] args) - throws CommandException { + public void processCommand(ICommandSender sender, String[] args) throws CommandException { runnable.processCommand(sender, args); } - public List<String> addTabCompletionOptions( - ICommandSender sender, - String[] args, - BlockPos pos - ) { - if (tabRunnable != null) return tabRunnable.tabComplete( - sender, - args, - pos - ); + public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { + if (tabRunnable != null) return tabRunnable.tabComplete(sender, args, pos); return null; } } |