aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/commands')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java20
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/commands/SimpleCommand.java3
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/commands/SimpleSubCommand.java15
3 files changed, 12 insertions, 26 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java b/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java
index 897c088..9f0a22d 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java
@@ -8,6 +8,8 @@ import com.thatgravyboat.skyblockhud.core.GuiScreenElementWrapper;
import com.thatgravyboat.skyblockhud.handlers.MapHandler;
import com.thatgravyboat.skyblockhud.location.LocationHandler;
import com.thatgravyboat.skyblockhud.playerstats.ActionBarParsing;
+import java.awt.*;
+import java.awt.datatransfer.StringSelection;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.boss.BossStatus;
import net.minecraft.util.ChatComponentText;
@@ -15,9 +17,6 @@ import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.client.ClientCommandHandler;
import org.apache.commons.lang3.StringUtils;
-import java.awt.*;
-import java.awt.datatransfer.StringSelection;
-
public class Commands {
private static boolean devMode = false;
@@ -33,7 +32,6 @@ public class Commands {
};
private static final SimpleSubCommand devCommand = new SimpleSubCommand("sbhdev", ImmutableSet.of("copyBossBar", "copyScoreboard", "copyActionBar")) {
-
@Override
void processSubCommand(ICommandSender sender, String subCommand, String[] args) {
StringSelection clipboard = null;
@@ -52,16 +50,7 @@ public class Commands {
}
if (clipboard != null) {
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(clipboard, clipboard);
- sender.addChatMessage(new ChatComponentText(
- "[" +
- EnumChatFormatting.RED +
- EnumChatFormatting.BOLD +
- "SkyBlockHud" +
- EnumChatFormatting.RESET +
- "] : " +
- EnumChatFormatting.GRAY +
- "Info copied to clipboard!"
- ));
+ sender.addChatMessage(new ChatComponentText("[" + EnumChatFormatting.RED + EnumChatFormatting.BOLD + "SkyBlockHud" + EnumChatFormatting.RESET + "] : " + EnumChatFormatting.GRAY + "Info copied to clipboard!"));
}
}
@@ -80,8 +69,7 @@ public class Commands {
"sbhmap",
new SimpleCommand.ProcessCommandRunnable() {
public void processCommand(ICommandSender sender, String[] args) {
- if (LocationHandler.getCurrentLocation().getCategory().getMap() != null && SkyblockHud.hasSkyblockScoreboard())
- SkyblockHud.screenToOpen = new MapHandler.MapScreen();
+ if (LocationHandler.getCurrentLocation().getCategory().getMap() != null && SkyblockHud.hasSkyblockScoreboard()) 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 d5d3c57..57ef316 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/commands/SimpleCommand.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/commands/SimpleCommand.java
@@ -1,11 +1,10 @@
package com.thatgravyboat.skyblockhud.commands;
+import java.util.List;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.util.BlockPos;
-import java.util.List;
-
/**
@author Moulberry
**/
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/commands/SimpleSubCommand.java b/src/main/java/com/thatgravyboat/skyblockhud/commands/SimpleSubCommand.java
index 7169c6d..6bb62ac 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/commands/SimpleSubCommand.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/commands/SimpleSubCommand.java
@@ -1,13 +1,12 @@
package com.thatgravyboat.skyblockhud.commands;
+import java.util.List;
+import java.util.Set;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.util.BlockPos;
import org.apache.commons.lang3.ArrayUtils;
-import java.util.List;
-import java.util.Set;
-
public abstract class SimpleSubCommand extends CommandBase {
private final String commandName;
@@ -25,7 +24,7 @@ public abstract class SimpleSubCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender sender) {
- return "/"+commandName;
+ return "/" + commandName;
}
@Override
@@ -34,7 +33,7 @@ public abstract class SimpleSubCommand extends CommandBase {
processNoSubCommand(sender);
return;
}
- if (subCommands.contains(args[0])){
+ if (subCommands.contains(args[0])) {
processSubCommand(sender, args[0], ArrayUtils.remove(args, 0));
return;
}
@@ -48,8 +47,8 @@ public abstract class SimpleSubCommand extends CommandBase {
@Override
public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) {
- if (args.length == 1){
- return getListOfStringsMatchingLastWord(args,subCommands);
+ if (args.length == 1) {
+ return getListOfStringsMatchingLastWord(args, subCommands);
}
return null;
}
@@ -58,5 +57,5 @@ public abstract class SimpleSubCommand extends CommandBase {
abstract void processNoSubCommand(ICommandSender sender);
- public void processBadSubCommand(ICommandSender sender, String subCommand){}
+ public void processBadSubCommand(ICommandSender sender, String subCommand) {}
}