aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/me/Danker/commands')
-rw-r--r--src/main/java/me/Danker/commands/DHelpCommand.java2
-rw-r--r--src/main/java/me/Danker/commands/DisplayCommand.java14
-rw-r--r--src/main/java/me/Danker/commands/LootCommand.java37
-rw-r--r--src/main/java/me/Danker/commands/ResetLootCommand.java4
-rw-r--r--src/main/java/me/Danker/commands/ToggleCommand.java16
5 files changed, 59 insertions, 14 deletions
diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java
index 43f6e94..d71d1b3 100644
--- a/src/main/java/me/Danker/commands/DHelpCommand.java
+++ b/src/main/java/me/Danker/commands/DHelpCommand.java
@@ -33,7 +33,7 @@ public class DHelpCommand extends CommandBase {
EnumChatFormatting.AQUA + " <> = Mandatory parameter. [] = Optional parameter.\n" +
EnumChatFormatting.GOLD + " Commands, " + EnumChatFormatting.GREEN + " Keybinds.\n" +
EnumChatFormatting.GOLD + " /dhelp" + EnumChatFormatting.AQUA + " - Returns this message.\n" +
- EnumChatFormatting.GOLD + " /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/sceptremessages/petcolors/dungeontimer/list>" + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" +
+ EnumChatFormatting.GOLD + " /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/sceptremessages/petcolors/dungeontimer/golemalerts/list>" + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" +
EnumChatFormatting.GOLD + " /setkey <key>" + EnumChatFormatting.AQUA + " - Sets API key.\n" +
EnumChatFormatting.GOLD + " /getkey" + EnumChatFormatting.AQUA + " - Returns key set with /setkey and copies it to your clipboard.\n" +
EnumChatFormatting.GOLD + " /loot <zombie/spider/wolf/fishing/catacombs> [winter/f(1-4)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" +
diff --git a/src/main/java/me/Danker/commands/DisplayCommand.java b/src/main/java/me/Danker/commands/DisplayCommand.java
index 2f7690d..b27079a 100644
--- a/src/main/java/me/Danker/commands/DisplayCommand.java
+++ b/src/main/java/me/Danker/commands/DisplayCommand.java
@@ -21,7 +21,7 @@ public class DisplayCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return getCommandName() + " <zombie/spider/wolf/fishing/catacombs/off> [winter/session/f(1-4)]";
+ return getCommandName() + " <zombie/spider/wolf/fishing/catacombs/off> [winter/festival/session/f(1-4)]";
}
@Override
@@ -34,7 +34,7 @@ public class DisplayCommand extends CommandBase {
if (args.length == 1) {
return getListOfStringsMatchingLastWord(args, "wolf", "spider", "zombie", "fishing", "catacombs", "off");
} else if (args.length == 2 && args[0].equalsIgnoreCase("fishing")) {
- return getListOfStringsMatchingLastWord(args, "winter", "session");
+ return getListOfStringsMatchingLastWord(args, "winter", "festival", "session");
} else if (args.length == 2 && args[0].equalsIgnoreCase("catacombs")) {
return getListOfStringsMatchingLastWord(args, "f1", "floor1", "f2", "floor2", "f3", "floor3", "f4", "floor4");
} else if (args.length > 1 || (args.length == 3 && args[0].equalsIgnoreCase("fishing") && args[1].equalsIgnoreCase("winter"))) {
@@ -48,7 +48,7 @@ public class DisplayCommand extends CommandBase {
final EntityPlayer player = (EntityPlayer) arg0;
if (arg1.length == 0) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: <zombie/spider/wolf/fishing/catacombs/off> [winter/session/f(1-4)]"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /" + getCommandUsage(arg0)));
return;
}
@@ -82,6 +82,12 @@ public class DisplayCommand extends CommandBase {
} else {
display = "fishing_winter";
}
+ } else if (arg1.length > 1 && arg1[1].equalsIgnoreCase("festival")) {
+ if (showSession) {
+ display = "fishing_festival_session";
+ } else {
+ display = "fishing_festival";
+ }
} else {
if (showSession) {
display = "fishing_session";
@@ -125,7 +131,7 @@ public class DisplayCommand extends CommandBase {
} else if (arg1[0].equalsIgnoreCase("off")) {
display = "off";
} else {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: <zombie/spider/wolf/fishing/catacombs/off> [winter/session/f(1-4)]"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /" + getCommandUsage(arg0)));
return;
}
player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Display set to " + EnumChatFormatting.DARK_GREEN + display + EnumChatFormatting.GREEN + "."));
diff --git a/src/main/java/me/Danker/commands/LootCommand.java b/src/main/java/me/Danker/commands/LootCommand.java
index a877a8d..e0fa0aa 100644
--- a/src/main/java/me/Danker/commands/LootCommand.java
+++ b/src/main/java/me/Danker/commands/LootCommand.java
@@ -83,6 +83,11 @@ public class LootCommand extends CommandBase {
public static int yetis;
public static double yetiTime;
public static int yetiSCs;
+ // Fishing Festival
+ public static int nurseSharks;
+ public static int blueSharks;
+ public static int tigerSharks;
+ public static int greatWhiteSharks;
// Catacombs Dungeons
public static int recombobulators;
@@ -184,6 +189,11 @@ public class LootCommand extends CommandBase {
public static int yetisSession = 0;
public static double yetiTimeSession = 0;
public static int yetiSCsSession = 0;
+ // Fishing Festival
+ public static int nurseSharksSession = 0;
+ public static int blueSharksSession = 0;
+ public static int tigerSharksSession = 0;
+ public static int greatWhiteSharksSession = 0;
// Catacombs Dungeons
public static int recombobulatorsSession = 0;
@@ -222,7 +232,7 @@ public class LootCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return getCommandName() + " <zombie/spider/wolf/fishing/catacombs> [winter/f(1-4)/session]";
+ return getCommandName() + " <zombie/spider/wolf/fishing/catacombs> [winter/festival/f(1-4)/session]";
}
@Override
@@ -235,7 +245,7 @@ public class LootCommand extends CommandBase {
if (args.length == 1) {
return getListOfStringsMatchingLastWord(args, "wolf", "spider", "zombie", "fishing", "catacombs");
} else if (args.length == 2 && args[0].equalsIgnoreCase("fishing")) {
- return getListOfStringsMatchingLastWord(args, "winter", "session");
+ return getListOfStringsMatchingLastWord(args, "winter", "festival", "session");
} else if (args.length == 2 && args[0].equalsIgnoreCase("catacombs")) {
return getListOfStringsMatchingLastWord(args, "f1", "floor1", "f2", "floor2", "f3", "floor3", "f4", "floor4");
} else if (args.length > 1 || (args.length == 3 && args[0].equalsIgnoreCase("fishing") && args[1].equalsIgnoreCase("winter"))) {
@@ -249,7 +259,7 @@ public class LootCommand extends CommandBase {
final EntityPlayer player = (EntityPlayer) arg0;
if (arg1.length == 0) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /loot <zombie/spider/wolf/fishing/catacombs> [winter/f(1-4)/session]"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /" + getCommandUsage(arg0)));
return;
}
@@ -507,6 +517,25 @@ public class LootCommand extends CommandBase {
EnumChatFormatting.AQUA + " Creatures Since Yeti: " + bossesBetween + "\n" +
EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " -------------------"));
return;
+ } else if (arg1[1].equalsIgnoreCase("festival")) {
+ if (showSession) {
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" +
+ EnumChatFormatting.DARK_BLUE + EnumChatFormatting.BOLD + " Fishing Festival Summary (Current Session):\n" +
+ EnumChatFormatting.LIGHT_PURPLE + " Nurse Sharks: " + nf.format(nurseSharksSession) + "\n" +
+ EnumChatFormatting.BLUE + " Blue Sharks: " + nf.format(blueSharksSession) + "\n" +
+ EnumChatFormatting.GOLD + " Tiger Sharks: " + nf.format(tigerSharksSession) + "\n" +
+ EnumChatFormatting.WHITE + " Great White Sharks: " + nf.format(greatWhiteSharksSession) + "\n" +
+ EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " -------------------"));
+ return;
+ }
+
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" +
+ EnumChatFormatting.DARK_BLUE + EnumChatFormatting.BOLD + " Fishing Festival Summary:\n" +
+ EnumChatFormatting.LIGHT_PURPLE + " Nurse Sharks: " + nf.format(nurseSharks) + "\n" +
+ EnumChatFormatting.BLUE + " Blue Sharks: " + nf.format(blueSharks) + "\n" +
+ EnumChatFormatting.GOLD + " Tiger Sharks: " + nf.format(tigerSharks) + "\n" +
+ EnumChatFormatting.WHITE + " Great White Sharks: " + nf.format(greatWhiteSharks) + "\n" +
+ EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " -------------------"));
}
}
@@ -689,7 +718,7 @@ public class LootCommand extends CommandBase {
player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /loot catacombs <f1/f2/f3/f4>"));
}
} else {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /loot <zombie/spider/wolf/fishing/catacombs> [winter/f(1-4)/session]"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /" + getCommandUsage(arg0)));
}
}
diff --git a/src/main/java/me/Danker/commands/ResetLootCommand.java b/src/main/java/me/Danker/commands/ResetLootCommand.java
index dd540d6..9a5d745 100644
--- a/src/main/java/me/Danker/commands/ResetLootCommand.java
+++ b/src/main/java/me/Danker/commands/ResetLootCommand.java
@@ -178,6 +178,10 @@ public class ResetLootCommand extends CommandBase {
lc.yetisSession = 0;
lc.yetiTimeSession = -1;
lc.yetiSCsSession = -1;
+ lc.nurseSharksSession = 0;
+ lc.blueSharksSession = 0;
+ lc.tigerSharksSession = 0;
+ lc.greatWhiteSharksSession = 0;
cf.deleteCategory("fishing");
cf.reloadConfig();
}
diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java
index b1e5270..373aae4 100644
--- a/src/main/java/me/Danker/commands/ToggleCommand.java
+++ b/src/main/java/me/Danker/commands/ToggleCommand.java
@@ -25,6 +25,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
public static boolean sceptreMessages;
public static boolean petColoursToggled;
public static boolean dungeonTimerToggled;
+ public static boolean golemAlertToggled;
@Override
public String getCommandName() {
@@ -33,7 +34,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalert/aotd/sceptremessages/petcolors/dungeontimer/list>";
+ return getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalert/aotd/sceptremessages/petcolors/dungeontimer/golemalerts/list>";
}
@Override
@@ -44,7 +45,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
@Override
public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) {
if (args.length == 1) {
- return getListOfStringsMatchingLastWord(args, "gparty", "coords", "golden", "slayercount", "rngesusalerts", "splitfishing", "chatmaddox", "spiritbearalerts", "aotd", "sceptremessages", "petcolors", "dungeontimer", "list");
+ return getListOfStringsMatchingLastWord(args, "gparty", "coords", "golden", "slayercount", "rngesusalerts", "splitfishing", "chatmaddox", "spiritbearalerts", "aotd", "sceptremessages", "petcolors", "dungeontimer", "golemalerts", "list");
}
return null;
}
@@ -55,7 +56,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
final ConfigHandler cf = new ConfigHandler();
if (arg1.length == 0) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/sceptremessages/petcolors/dungeontimer/list>"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /" + getCommandUsage(arg0)));
return;
}
@@ -107,6 +108,10 @@ public class ToggleCommand extends CommandBase implements ICommand {
dungeonTimerToggled = !dungeonTimerToggled;
cf.writeBooleanConfig("toggles", "DungeonTimer", dungeonTimerToggled);
player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Dungeon timer has been set to " + EnumChatFormatting.DARK_GREEN + dungeonTimerToggled + EnumChatFormatting.GREEN + "."));
+ } else if (arg1[0].equalsIgnoreCase("golemalerts")) {
+ golemAlertToggled = !golemAlertToggled;
+ cf.writeBooleanConfig("toggles", "GolemAlerts", golemAlertToggled);
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Golem spawn alerts has been set to " + EnumChatFormatting.DARK_GREEN + golemAlertToggled + EnumChatFormatting.GREEN + "."));
} else if (arg1[0].equalsIgnoreCase("list")) {
player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Guild party notifications: " + EnumChatFormatting.DARK_GREEN + gpartyToggled + "\n" +
EnumChatFormatting.GREEN + " Coord/Angle display: " + EnumChatFormatting.DARK_GREEN + coordsToggled + "\n" +
@@ -119,9 +124,10 @@ public class ToggleCommand extends CommandBase implements ICommand {
EnumChatFormatting.GREEN + " Block AOTD ability: " + EnumChatFormatting.DARK_GREEN + aotdToggled + "\n" +
EnumChatFormatting.GREEN + " Spirit Sceptre messages: " + EnumChatFormatting.DARK_GREEN + sceptreMessages + "\n" +
EnumChatFormatting.GREEN + " Pet colours: " + EnumChatFormatting.DARK_GREEN + petColoursToggled + "\n" +
- EnumChatFormatting.GREEN + " Dungeon timer: " + EnumChatFormatting.DARK_GREEN + dungeonTimerToggled));
+ EnumChatFormatting.GREEN + " Dungeon timer: " + EnumChatFormatting.DARK_GREEN + dungeonTimerToggled + "\n" +
+ EnumChatFormatting.GREEN + " Golem spawn alerts: " + EnumChatFormatting.DARK_GREEN + golemAlertToggled));
} else {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/sceptremessages/petcolors/dungeontimer/list>"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /" + getCommandUsage(arg0)));
}
}
}