diff options
author | bowser0000 <bowser0000@gmail.com> | 2020-08-18 19:13:51 -0400 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2020-08-18 19:13:51 -0400 |
commit | 4bce023a8c60e165ea1627733f6ada2a2d966350 (patch) | |
tree | e1ea6ceab26b58634ee0af06cc811aa88155295f /src | |
parent | 7d56e9f24622cc16b60c1e23c1affcb809bd6772 (diff) | |
download | SkyblockMod-4bce023a8c60e165ea1627733f6ada2a2d966350.tar.gz SkyblockMod-4bce023a8c60e165ea1627733f6ada2a2d966350.tar.bz2 SkyblockMod-4bce023a8c60e165ea1627733f6ada2a2d966350.zip |
Add Spirit Bear alerts
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/me/Danker/TheMod.java | 5 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/DHelpCommand.java | 2 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/ToggleCommand.java | 16 | ||||
-rw-r--r-- | src/main/java/me/Danker/handlers/ConfigHandler.java | 2 |
4 files changed, 19 insertions, 6 deletions
diff --git a/src/main/java/me/Danker/TheMod.java b/src/main/java/me/Danker/TheMod.java index c7025f9..a1fc23a 100644 --- a/src/main/java/me/Danker/TheMod.java +++ b/src/main/java/me/Danker/TheMod.java @@ -751,6 +751,11 @@ public class TheMod } if (tc.chatMaddoxToggled) Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Click anywhere in chat to open Maddox")); } + + // Spirit Bear alerts + if (message.contains("The Spirit Bear has appeared!")) { + if (tc.spiritBearAlerts) Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "SPIRIT BEAR", 2); + } } @SubscribeEvent diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java index cd08a14..3bfafa0 100644 --- a/src/main/java/me/Danker/commands/DHelpCommand.java +++ b/src/main/java/me/Danker/commands/DHelpCommand.java @@ -32,7 +32,7 @@ public class DHelpCommand extends CommandBase { player.addChatMessage(new ChatComponentText("\n" + EnumChatFormatting.GOLD + " " + TheMod.MODID + " Version " + TheMod.VERSION + "\n" + EnumChatFormatting.AQUA + " <> = Mandatory parameter. [] = Optional parameter.\n" + EnumChatFormatting.GOLD + " /dhelp" + EnumChatFormatting.AQUA + " - Returns this message.\n" + - EnumChatFormatting.GOLD + " /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/list>" + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + + EnumChatFormatting.GOLD + " /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/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/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index 17f48d7..9370ba3 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -20,6 +20,7 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean rngesusAlerts; public static boolean splitFishing; public static boolean chatMaddoxToggled; + public static boolean spiritBearAlerts; @Override public String getCommandName() { @@ -28,7 +29,7 @@ public class ToggleCommand extends CommandBase implements ICommand { @Override public String getCommandUsage(ICommandSender arg0) { - return getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/list>"; + return getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalert/list>"; } @Override @@ -39,7 +40,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", "list"); + return getListOfStringsMatchingLastWord(args, "gparty", "coords", "golden", "slayercount", "rngesusalerts", "splitfishing", "chatmaddox", "spiritbearalerts", "list"); } return null; } @@ -50,7 +51,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/list>")); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/list>")); return; } @@ -82,6 +83,10 @@ public class ToggleCommand extends CommandBase implements ICommand { chatMaddoxToggled = !chatMaddoxToggled; cf.writeBooleanConfig("toggles", "ChatMaddox", chatMaddoxToggled); player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Chat Maddox menu has been set to " + EnumChatFormatting.DARK_GREEN + chatMaddoxToggled + EnumChatFormatting.GREEN + ".")); + } else if (arg1[0].equalsIgnoreCase("spiritbearalerts")) { + spiritBearAlerts = !spiritBearAlerts; + cf.writeBooleanConfig("toggles", "SpiritBearAlerts", spiritBearAlerts); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Spirit Bear alerts have been set to " + EnumChatFormatting.DARK_GREEN + spiritBearAlerts + 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" + @@ -89,9 +94,10 @@ public class ToggleCommand extends CommandBase implements ICommand { EnumChatFormatting.GREEN + " Counting total 20% slayer drops: " + EnumChatFormatting.DARK_GREEN + slayerCountTotal + "\n" + EnumChatFormatting.GREEN + " Slayer RNGesus alerts: " + EnumChatFormatting.DARK_GREEN + rngesusAlerts + "\n" + EnumChatFormatting.GREEN + " Split fishing display: " + EnumChatFormatting.DARK_GREEN + splitFishing + "\n" + - EnumChatFormatting.GREEN + " Chat Maddox menu: " + EnumChatFormatting.DARK_GREEN + chatMaddoxToggled)); + EnumChatFormatting.GREEN + " Chat Maddox menu: " + EnumChatFormatting.DARK_GREEN + chatMaddoxToggled + "\n" + + EnumChatFormatting.GREEN + " Spirit Bear alerts: " + EnumChatFormatting.DARK_GREEN + spiritBearAlerts)); } else { - player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/list>")); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/list>")); } } } diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index f65fe5a..10b2e0d 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -176,6 +176,7 @@ public class ConfigHandler { if (!hasKey("toggles", "RNGesusAlerts")) writeBooleanConfig("toggles", "RNGesusAlerts", true); if (!hasKey("toggles", "SplitFishing")) writeBooleanConfig("toggles", "SplitFishing", true); if (!hasKey("toggles", "ChatMaddox")) writeBooleanConfig("toggles", "ChatMaddox", true); + if (!hasKey("toggles", "SpiritBearAlerts")) writeBooleanConfig("toggles", "SpiritBearAlerts", true); if (!hasKey("api", "APIKey")) writeStringConfig("api", "APIKey", ""); // Wolf Loot @@ -287,6 +288,7 @@ public class ConfigHandler { tf.rngesusAlerts = getBoolean("toggles", "RNGesusAlerts"); tf.splitFishing = getBoolean("toggles", "SplitFishing"); tf.chatMaddoxToggled = getBoolean("toggles", "ChatMaddox"); + tf.spiritBearAlerts = getBoolean("toggles", "SpiritBearAlerts"); final LootCommand lc = new LootCommand(); // Wolf |