diff options
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/JoinDungeonCommand.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/JoinDungeonCommand.java | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/JoinDungeonCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/JoinDungeonCommand.java index 0326d387..874e81db 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/JoinDungeonCommand.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/JoinDungeonCommand.java @@ -11,30 +11,31 @@ import org.apache.commons.lang3.StringUtils; public class JoinDungeonCommand extends ClientCommandBase { - public JoinDungeonCommand() { - super("join"); - } + public JoinDungeonCommand() { + super("join"); + } - @Override - public void processCommand(ICommandSender sender, String[] args) throws CommandException { - if (!NotEnoughUpdates.INSTANCE.hasSkyblockScoreboard()) { - Minecraft.getMinecraft().thePlayer.sendChatMessage("/join " + StringUtils.join(args, " ")); - } else { - if (args.length != 1) { - Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText( - EnumChatFormatting.RED + "Example Usage: /join f7, /join m6 or /join 7")); - } else { - String cataPrefix = "catacombs"; - if (args[0].startsWith("m")) { - cataPrefix = "master_catacombs"; - } - String cmd = "/joindungeon " + cataPrefix + " " + args[0].charAt(args[0].length() - 1); - Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText( - EnumChatFormatting.YELLOW + "Running command: " + cmd)); - Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText( - EnumChatFormatting.YELLOW + "The dungeon should start soon. If it doesn't, make sure you have a party of 5 people")); - Minecraft.getMinecraft().thePlayer.sendChatMessage(cmd); - } - } - } + @Override + public void processCommand(ICommandSender sender, String[] args) throws CommandException { + if (!NotEnoughUpdates.INSTANCE.hasSkyblockScoreboard()) { + Minecraft.getMinecraft().thePlayer.sendChatMessage("/join " + StringUtils.join(args, " ")); + } else { + if (args.length != 1) { + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText( + EnumChatFormatting.RED + "Example Usage: /join f7, /join m6 or /join 7")); + } else { + String cataPrefix = "catacombs"; + if (args[0].startsWith("m")) { + cataPrefix = "master_catacombs"; + } + String cmd = "/joindungeon " + cataPrefix + " " + args[0].charAt(args[0].length() - 1); + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText( + EnumChatFormatting.YELLOW + "Running command: " + cmd)); + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText( + EnumChatFormatting.YELLOW + + "The dungeon should start soon. If it doesn't, make sure you have a party of 5 people")); + Minecraft.getMinecraft().thePlayer.sendChatMessage(cmd); + } + } + } } |
