aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/commands
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2021-03-28 17:46:45 -0400
committerbowser0000 <bowser0000@gmail.com>2021-03-28 17:46:45 -0400
commit57e5469f651610a4f07bf8e5266b789d7ca1fe34 (patch)
tree269182a8c643b6ce197e12c35b8253b6eb9bb019 /src/main/java/me/Danker/commands
parent786efa0ea48daffb075d2d6482a677571e136a1b (diff)
downloadSkyblockMod-57e5469f651610a4f07bf8e5266b789d7ca1fe34.tar.gz
SkyblockMod-57e5469f651610a4f07bf8e5266b789d7ca1fe34.tar.bz2
SkyblockMod-57e5469f651610a4f07bf8e5266b789d7ca1fe34.zip
Change /dsmmusic volume to percentage from decibels
Also fix custom music not cancelling note block music
Diffstat (limited to 'src/main/java/me/Danker/commands')
-rw-r--r--src/main/java/me/Danker/commands/CustomMusicCommand.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/main/java/me/Danker/commands/CustomMusicCommand.java b/src/main/java/me/Danker/commands/CustomMusicCommand.java
index 6412474..0e80dd3 100644
--- a/src/main/java/me/Danker/commands/CustomMusicCommand.java
+++ b/src/main/java/me/Danker/commands/CustomMusicCommand.java
@@ -24,7 +24,7 @@ public class CustomMusicCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return "/" + getCommandName() + " <stop/reload/volume> [dungeonboss/bloodroom/dungeon] [#]";
+ return "/" + getCommandName() + " <stop/reload/volume> [dungeonboss/bloodroom/dungeon] [1-100]";
}
public static String usage(ICommandSender arg0) {
@@ -75,7 +75,7 @@ public class CustomMusicCommand extends CommandBase {
return;
}
- float volume = Float.parseFloat(arg1[2]);
+ int volume = Integer.parseInt(arg1[2]);
boolean success;
switch (arg1[1].toLowerCase()) {
@@ -85,8 +85,8 @@ public class CustomMusicCommand extends CommandBase {
return;
}
- CustomMusic.dungeonbossDecibels = volume;
- ConfigHandler.writeIntConfig("music", "DungeonBossDecibels", (int) volume);
+ CustomMusic.dungeonbossVolume = volume;
+ ConfigHandler.writeIntConfig("music", "DungeonBossVolume", volume);
break;
case "bloodroom":
success = CustomMusic.bloodroom.setVolume(volume);
@@ -94,8 +94,8 @@ public class CustomMusicCommand extends CommandBase {
return;
}
- CustomMusic.bloodroomDecibels = volume;
- ConfigHandler.writeIntConfig("music", "BloodRoomDecibels", (int) volume);
+ CustomMusic.bloodroomVolume = volume;
+ ConfigHandler.writeIntConfig("music", "BloodRoomVolume", volume);
break;
case "dungeon":
success = CustomMusic.dungeon.setVolume(volume);
@@ -103,15 +103,15 @@ public class CustomMusicCommand extends CommandBase {
return;
}
- CustomMusic.dungeonDecibels = volume;
- ConfigHandler.writeIntConfig("music", "DungeonDecibels", (int) volume);
+ CustomMusic.dungeonVolume = volume;
+ ConfigHandler.writeIntConfig("music", "DungeonVolume", volume);
break;
default:
player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
return;
}
- player.addChatMessage(new ChatComponentText(DankersSkyblockMod.SECONDARY_COLOUR + arg1[1] + DankersSkyblockMod.MAIN_COLOUR + " was set to " + DankersSkyblockMod.SECONDARY_COLOUR + volume + "db"));
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.SECONDARY_COLOUR + arg1[1] + DankersSkyblockMod.MAIN_COLOUR + " was set to " + DankersSkyblockMod.SECONDARY_COLOUR + volume + "%"));
break;
default:
player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));