diff options
author | bowser0000 <bowser0000@gmail.com> | 2021-07-31 21:16:48 -0400 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2021-07-31 21:16:48 -0400 |
commit | 5f2206d383afd3b6424ccda1a2d36522cfbe9b1f (patch) | |
tree | 0fe1e02c66441ec02dd23d8023e94215d8f6bb2f /src/main/java/me/Danker | |
parent | d807469333b343e7726536b12d13ff29e3b136c5 (diff) | |
download | SkyblockMod-5f2206d383afd3b6424ccda1a2d36522cfbe9b1f.tar.gz SkyblockMod-5f2206d383afd3b6424ccda1a2d36522cfbe9b1f.tar.bz2 SkyblockMod-5f2206d383afd3b6424ccda1a2d36522cfbe9b1f.zip |
Add spiders den to custom music
I forgot it existed
Diffstat (limited to 'src/main/java/me/Danker')
6 files changed, 43 insertions, 17 deletions
diff --git a/src/main/java/me/Danker/commands/CustomMusicCommand.java b/src/main/java/me/Danker/commands/CustomMusicCommand.java index 45e3770..c07ab45 100644 --- a/src/main/java/me/Danker/commands/CustomMusicCommand.java +++ b/src/main/java/me/Danker/commands/CustomMusicCommand.java @@ -25,7 +25,7 @@ public class CustomMusicCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { return "/" + getCommandName() + " <stop/reload/volume> [dungeonboss/bloodroom/dungeon/hub/island/dungeonhub/farmingislands/" + - "goldmine/deepcaverns/dwarvenmines/crystalhollows/blazingfortress/end/park] [1-100]"; + "goldmine/deepcaverns/dwarvenmines/crystalhollows/spidersden/blazingfortress/end/park] [1-100]"; } public static String usage(ICommandSender arg0) { @@ -43,7 +43,7 @@ public class CustomMusicCommand extends CommandBase { return getListOfStringsMatchingLastWord(args, "stop", "reload", "volume"); } else if (args.length == 2) { return getListOfStringsMatchingLastWord(args, "dungeonboss", "bloodroom", "dungeon", "hub", "island", "dungeonhub", "farmingislands", "goldmine", - "deepcaverns", "dwarvenmines", "crystalhollows", "blazingfortress", "end", "park"); + "deepcaverns", "dwarvenmines", "crystalhollows", "spidersden", "blazingfortress", "end", "park"); } return null; } @@ -146,6 +146,12 @@ public class CustomMusicCommand extends CommandBase { CustomMusic.crystalHollowsVolume = volume; ConfigHandler.writeIntConfig("music", "CrystalHollowsVolume", volume); break; + case "spidersden": + if (!CustomMusic.spidersDen.setVolume(volume)) return; + + CustomMusic.spidersDenVolume = volume; + ConfigHandler.writeIntConfig("music", "SpidersDenVolume", volume); + break; case "blazingfortress": if (!CustomMusic.blazingFortress.setVolume(volume)) return; diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index 65900fd..7d1020a 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -96,6 +96,7 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean deepCavernsMusic; public static boolean dwarvenMinesMusic; public static boolean crystalHollowsMusic; + public static boolean spidersDenMusic; public static boolean blazingFortressMusic; public static boolean endMusic; public static boolean parkMusic; @@ -118,7 +119,7 @@ public class ToggleCommand extends CommandBase implements ICommand { "melodytooltips/highlightslayers/highlightarachne/highlightskeletonmasters/teammatesinradius/" + "gianthp/hidepetcandy/customcolorednames/endoffarmalert/gemstonelore/crystalhollowwaypoints/crystalautowaypoints/" + "autoacceptreparty/dungeonbossmusic/bloodroommusic/dungeonmusic/hubmusic/islandmusic/dungeonhubmusic/" + - "farmingislandsmusic/goldminemusic/deepcavernsmusic/crystalhollowsmusic/blazingfortressmusic/endmusic/" + + "farmingislandsmusic/goldminemusic/deepcavernsmusic/crystalhollowsmusic/spidersdenmusic/blazingfortressmusic/endmusic/" + "parkmusic/list>"; } @@ -151,7 +152,7 @@ public class ToggleCommand extends CommandBase implements ICommand { "teammatesinradius", "gianthp", "hidepetcandy", "customcolorednames", "endoffarmalert", "gemstonelore", "crystalhollowwaypoints", "crystalautowaypoints", "autoacceptreparty", "hubmusic", "islandmusic", "dungeonhubmusic", "farmingislandsmusic", "goldminemusic", - "deepcavernsmusic", "dwarvenminesmusic", "crystalhollowsmusic", "blazingfortressmusic", + "deepcavernsmusic", "dwarvenminesmusic", "crystalhollowsmusic", "spidersdenmusic", "blazingfortressmusic", "endmusic", "parkmusic", "list"); } return null; @@ -550,6 +551,12 @@ public class ToggleCommand extends CommandBase implements ICommand { ConfigHandler.writeBooleanConfig("toggles", "CrystalHollowsMusic", crystalHollowsMusic); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Custom crystal hollows music has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + crystalHollowsMusic + DankersSkyblockMod.MAIN_COLOUR + ".")); break; + case "spidersdenmusic": + spidersDenMusic = !spidersDenMusic; + CustomMusic.spidersDen.stop(); + ConfigHandler.writeBooleanConfig("toggles", "SpidersDenMusic", spidersDenMusic); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Custom spider's den music has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + spidersDenMusic + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; case "blazingfortressmusic": blazingFortressMusic = !blazingFortressMusic; CustomMusic.blazingFortress.stop(); @@ -635,6 +642,7 @@ public class ToggleCommand extends CommandBase implements ICommand { DankersSkyblockMod.TYPE_COLOUR + " Custom deep caverns music: " + DankersSkyblockMod.VALUE_COLOUR + deepCavernsMusic + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Custom dwarven mines music: " + DankersSkyblockMod.VALUE_COLOUR + dwarvenMinesMusic + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Custom crystal hollows music: " + DankersSkyblockMod.VALUE_COLOUR + crystalHollowsMusic + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Custom spider's den music: " + DankersSkyblockMod.VALUE_COLOUR + spidersDenMusic + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Custom blazing fortress music: " + DankersSkyblockMod.VALUE_COLOUR + blazingFortressMusic + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Custom end music: " + DankersSkyblockMod.VALUE_COLOUR + endMusic + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Custom park music: " + DankersSkyblockMod.VALUE_COLOUR + parkMusic diff --git a/src/main/java/me/Danker/features/ArachneESP.java b/src/main/java/me/Danker/features/ArachneESP.java index 7e39a8f..1848a9b 100644 --- a/src/main/java/me/Danker/features/ArachneESP.java +++ b/src/main/java/me/Danker/features/ArachneESP.java @@ -30,19 +30,10 @@ public class ArachneESP { arachne = null; } - public boolean inSpidersDen(List<String> scoreboard) { - for (String s : scoreboard) { - if (ScoreboardHandler.cleanSB(s).contains("Spider's Den")) { - return true; - } - } - return false; - } - @SubscribeEvent public void onChat(ClientChatReceivedEvent event) { if (!Utils.inSkyblock) return; - if (!inSpidersDen(ScoreboardHandler.getSidebarLines())) return; + if (!Utils.tabLocation.equals("Spider's Den")) return; String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); if (message.contains("Something is awakening")){ arachneActive = true; diff --git a/src/main/java/me/Danker/features/CustomMusic.java b/src/main/java/me/Danker/features/CustomMusic.java index 16fef34..4891fe3 100644 --- a/src/main/java/me/Danker/features/CustomMusic.java +++ b/src/main/java/me/Danker/features/CustomMusic.java @@ -49,6 +49,8 @@ public class CustomMusic { public static int dwarvenMinesVolume; public static Song crystalHollows; public static int crystalHollowsVolume; + public static Song spidersDen; + public static int spidersDenVolume; public static Song blazingFortress; public static int blazingFortressVolume; public static Song end; @@ -114,6 +116,9 @@ public class CustomMusic { case "Crystal Hollows": if (ToggleCommand.crystalHollowsMusic) crystalHollows.start(); break; + case "Spider's Den": + if (ToggleCommand.spidersDenMusic) spidersDen.start(); + break; case "Blazing Fortress": if (ToggleCommand.blazingFortressMusic) blazingFortress.start(); break; @@ -178,6 +183,7 @@ public class CustomMusic { deepCaverns = new Song(directory, "deepcaverns", deepCavernsVolume); dwarvenMines = new Song(directory, "dwarvenmines", dwarvenMinesVolume); crystalHollows = new Song(directory, "crystalhollows", crystalHollowsVolume); + spidersDen = new Song(directory, "spidersden", spidersDenVolume); blazingFortress = new Song(directory, "blazingfortress", blazingFortressVolume); end = new Song(directory, "end", endVolume); park = new Song(directory, "park", parkVolume); @@ -195,6 +201,7 @@ public class CustomMusic { if (deepCaverns != null) deepCaverns.stop(); if (dwarvenMines != null) dwarvenMines.stop(); if (crystalHollows != null) crystalHollows.stop(); + if (spidersDen != null) spidersDen.stop(); if (blazingFortress != null) blazingFortress.stop(); if (end != null) end.stop(); if (park != null) park.stop(); diff --git a/src/main/java/me/Danker/gui/CustomMusicGui.java b/src/main/java/me/Danker/gui/CustomMusicGui.java index 3e634bf..83bed09 100644 --- a/src/main/java/me/Danker/gui/CustomMusicGui.java +++ b/src/main/java/me/Danker/gui/CustomMusicGui.java @@ -29,6 +29,7 @@ public class CustomMusicGui extends GuiScreen { private GuiButton deepCavernsMusic; private GuiButton dwarvenMinesMusic; private GuiButton crystalHollowsMusic; + private GuiButton spidersDenMusic; private GuiButton blazingFortressMusic; private GuiButton endMusic; private GuiButton parkMusic; @@ -65,9 +66,10 @@ public class CustomMusicGui extends GuiScreen { deepCavernsMusic = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Custom Deep Caverns Music: " + Utils.getColouredBoolean(ToggleCommand.deepCavernsMusic)); dwarvenMinesMusic = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Custom Dwarven Mines Music: " + Utils.getColouredBoolean(ToggleCommand.dwarvenMinesMusic)); crystalHollowsMusic = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Custom Crystal Hollows Music: " + Utils.getColouredBoolean(ToggleCommand.crystalHollowsMusic)); - blazingFortressMusic = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Custom Blazing Fortress Music: " + Utils.getColouredBoolean(ToggleCommand.blazingFortressMusic)); - endMusic = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Custom End Music: " + Utils.getColouredBoolean(ToggleCommand.endMusic)); - parkMusic = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Custom Park Music: " + Utils.getColouredBoolean(ToggleCommand.parkMusic)); + spidersDenMusic = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Custom Spider's Den Music: " + Utils.getColouredBoolean(ToggleCommand.spidersDenMusic)); + blazingFortressMusic = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Custom Blazing Fortress Music: " + Utils.getColouredBoolean(ToggleCommand.blazingFortressMusic)); + endMusic = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Custom End Music: " + Utils.getColouredBoolean(ToggleCommand.endMusic)); + parkMusic = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Custom Park Music: " + Utils.getColouredBoolean(ToggleCommand.parkMusic)); switch (page) { case 1: @@ -85,8 +87,13 @@ public class CustomMusicGui extends GuiScreen { this.buttonList.add(deepCavernsMusic); this.buttonList.add(dwarvenMinesMusic); this.buttonList.add(crystalHollowsMusic); + this.buttonList.add(spidersDenMusic); this.buttonList.add(blazingFortressMusic); this.buttonList.add(endMusic); + this.buttonList.add(nextPage); + this.buttonList.add(backPage); + break; + case 3: this.buttonList.add(parkMusic); this.buttonList.add(backPage); break; @@ -164,6 +171,11 @@ public class CustomMusicGui extends GuiScreen { CustomMusic.crystalHollows.stop(); ConfigHandler.writeBooleanConfig("toggles", "CrystalHollowsMusic", ToggleCommand.crystalHollowsMusic); crystalHollowsMusic.displayString = "Custom Crystal Hollows Music: " + Utils.getColouredBoolean(ToggleCommand.crystalHollowsMusic); + } else if (button == spidersDenMusic) { + ToggleCommand.spidersDenMusic = !ToggleCommand.spidersDenMusic; + CustomMusic.spidersDen.stop(); + ConfigHandler.writeBooleanConfig("toggles", "SpidersDenMusic", ToggleCommand.spidersDenMusic); + spidersDenMusic.displayString = "Custom Spider's Den Music: " + Utils.getColouredBoolean(ToggleCommand.spidersDenMusic); } else if (button == blazingFortressMusic) { ToggleCommand.blazingFortressMusic = !ToggleCommand.blazingFortressMusic; CustomMusic.blazingFortress.stop(); diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index cfee6b2..98368e1 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -270,6 +270,7 @@ public class ConfigHandler { ToggleCommand.deepCavernsMusic = initBoolean("toggles", "DeepCavernsMusic", false); ToggleCommand.dwarvenMinesMusic = initBoolean("toggles", "DwarvenMinesMusic", false); ToggleCommand.crystalHollowsMusic = initBoolean("toggles", "CrystalHollowsMusic", false); + ToggleCommand.spidersDenMusic = initBoolean("toggles", "SpidersDenMusic", false); ToggleCommand.blazingFortressMusic = initBoolean("toggles", "BlazingFortressMusic", false); ToggleCommand.endMusic = initBoolean("toggles", "Music", false); ToggleCommand.parkMusic = initBoolean("toggles", "Music", false); @@ -285,6 +286,7 @@ public class ConfigHandler { CustomMusic.deepCavernsVolume = initInt("music", "DeepCavernsVolume", 50); CustomMusic.dwarvenMinesVolume = initInt("music", "DwarvenMinesVolume", 50); CustomMusic.crystalHollowsVolume = initInt("music", "CrystalHollowsVolume", 50); + CustomMusic.spidersDenVolume = initInt("music", "SpidersDenVolume", 50); CustomMusic.blazingFortressVolume = initInt("music", "BlazingFortressVolume", 50); CustomMusic.endVolume = initInt("music", "EndVolume", 50); CustomMusic.parkVolume = initInt("music", "ParkVolume", 50); |