aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/commands/CustomMusicCommand.java
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2021-07-31 19:58:02 -0400
committerbowser0000 <bowser0000@gmail.com>2021-07-31 19:58:02 -0400
commita49b673bd9badcb7c4c02539f53c39c5b52c1b32 (patch)
tree649d076f99fe34d45fec19e86a36b9c5e8a120c1 /src/main/java/me/Danker/commands/CustomMusicCommand.java
parent342c6c8c6096db1e3e0e2ea4363ba34764f1121b (diff)
downloadSkyblockMod-a49b673bd9badcb7c4c02539f53c39c5b52c1b32.tar.gz
SkyblockMod-a49b673bd9badcb7c4c02539f53c39c5b52c1b32.tar.bz2
SkyblockMod-a49b673bd9badcb7c4c02539f53c39c5b52c1b32.zip
Add custom music to every area
Hub, island, farming islands, gold mine, deep caverns, dwarven mines, crystal hollows, blazing fortress, end, park
Diffstat (limited to 'src/main/java/me/Danker/commands/CustomMusicCommand.java')
-rw-r--r--src/main/java/me/Danker/commands/CustomMusicCommand.java88
1 files changed, 73 insertions, 15 deletions
diff --git a/src/main/java/me/Danker/commands/CustomMusicCommand.java b/src/main/java/me/Danker/commands/CustomMusicCommand.java
index 0e80dd3..45e3770 100644
--- a/src/main/java/me/Danker/commands/CustomMusicCommand.java
+++ b/src/main/java/me/Danker/commands/CustomMusicCommand.java
@@ -24,7 +24,8 @@ public class CustomMusicCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return "/" + getCommandName() + " <stop/reload/volume> [dungeonboss/bloodroom/dungeon] [1-100]";
+ return "/" + getCommandName() + " <stop/reload/volume> [dungeonboss/bloodroom/dungeon/hub/island/dungeonhub/farmingislands/" +
+ "goldmine/deepcaverns/dwarvenmines/crystalhollows/blazingfortress/end/park] [1-100]";
}
public static String usage(ICommandSender arg0) {
@@ -41,7 +42,8 @@ public class CustomMusicCommand extends CommandBase {
if (args.length == 1) {
return getListOfStringsMatchingLastWord(args, "stop", "reload", "volume");
} else if (args.length == 2) {
- return getListOfStringsMatchingLastWord(args, "dungeonboss", "bloodroom", "dungeon");
+ return getListOfStringsMatchingLastWord(args, "dungeonboss", "bloodroom", "dungeon", "hub", "island", "dungeonhub", "farmingislands", "goldmine",
+ "deepcaverns", "dwarvenmines", "crystalhollows", "blazingfortress", "end", "park");
}
return null;
}
@@ -76,36 +78,92 @@ public class CustomMusicCommand extends CommandBase {
}
int volume = Integer.parseInt(arg1[2]);
- boolean success;
switch (arg1[1].toLowerCase()) {
case "dungeonboss":
- success = CustomMusic.dungeonboss.setVolume(volume);
- if (!success) {
- return;
- }
+ if (!CustomMusic.dungeonboss.setVolume(volume)) return;
CustomMusic.dungeonbossVolume = volume;
ConfigHandler.writeIntConfig("music", "DungeonBossVolume", volume);
break;
case "bloodroom":
- success = CustomMusic.bloodroom.setVolume(volume);
- if (!success) {
- return;
- }
+ if (!CustomMusic.bloodroom.setVolume(volume)) return;
CustomMusic.bloodroomVolume = volume;
ConfigHandler.writeIntConfig("music", "BloodRoomVolume", volume);
break;
case "dungeon":
- success = CustomMusic.dungeon.setVolume(volume);
- if (!success) {
- return;
- }
+ if (!CustomMusic.dungeon.setVolume(volume)) return;
CustomMusic.dungeonVolume = volume;
ConfigHandler.writeIntConfig("music", "DungeonVolume", volume);
break;
+ case "hub":
+ if (!CustomMusic.hub.setVolume(volume)) return;
+
+ CustomMusic.hubVolume = volume;
+ ConfigHandler.writeIntConfig("music", "HubVolume", volume);
+ break;
+ case "island":
+ if (!CustomMusic.island.setVolume(volume)) return;
+
+ CustomMusic.islandVolume = volume;
+ ConfigHandler.writeIntConfig("music", "IslandVolume", volume);
+ break;
+ case "dungeonhub":
+ if (!CustomMusic.dungeonHub.setVolume(volume)) return;
+
+ CustomMusic.dungeonHubVolume = volume;
+ ConfigHandler.writeIntConfig("music", "DungeonHubVolume", volume);
+ break;
+ case "farmingislands":
+ if (!CustomMusic.farmingIslands.setVolume(volume)) return;
+
+ CustomMusic.farmingIslandsVolume = volume;
+ ConfigHandler.writeIntConfig("music", "FarmingIslandsVolume", volume);
+ break;
+ case "goldmine":
+ if (!CustomMusic.goldMine.setVolume(volume)) return;
+
+ CustomMusic.goldMineVolume = volume;
+ ConfigHandler.writeIntConfig("music", "GoldMineVolume", volume);
+ break;
+ case "deepcaverns":
+ if (!CustomMusic.deepCaverns.setVolume(volume)) return;
+
+ CustomMusic.deepCavernsVolume = volume;
+ ConfigHandler.writeIntConfig("music", "DeepCavernsVolume", volume);
+ break;
+ case "dwarvenmines":
+ if (!CustomMusic.dwarvenMines.setVolume(volume)) return;
+
+ CustomMusic.dwarvenMinesVolume = volume;
+ ConfigHandler.writeIntConfig("music", "DwarvenMinesVolume", volume);
+ break;
+ case "crystalhollows":
+ if (!CustomMusic.crystalHollows.setVolume(volume)) return;
+
+ CustomMusic.crystalHollowsVolume = volume;
+ ConfigHandler.writeIntConfig("music", "CrystalHollowsVolume", volume);
+ break;
+ case "blazingfortress":
+ if (!CustomMusic.blazingFortress.setVolume(volume)) return;
+
+ CustomMusic.blazingFortressVolume = volume;
+ ConfigHandler.writeIntConfig("music", "BlazingFortressVolume", volume);
+ break;
+ case "end":
+ if (!CustomMusic.end.setVolume(volume)) return;
+
+ CustomMusic.endVolume = volume;
+ ConfigHandler.writeIntConfig("music", "EndVolume", volume);
+ break;
+ case "park":
+ if (!CustomMusic.park.setVolume(volume)) return;
+
+ CustomMusic.parkVolume = volume;
+ ConfigHandler.writeIntConfig("music", "ParkVolume", volume);
+ break;
default:
player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
return;