diff --git a/src/main/kotlin/dev/arbjerg/ukulele/command/VolumeCommand.kt b/src/main/kotlin/dev/arbjerg/ukulele/command/VolumeCommand.kt index 879e2689..6367e215 100644 --- a/src/main/kotlin/dev/arbjerg/ukulele/command/VolumeCommand.kt +++ b/src/main/kotlin/dev/arbjerg/ukulele/command/VolumeCommand.kt @@ -16,7 +16,10 @@ class VolumeCommand(val players: PlayerRegistry) : Command("volume", "v") { ?: return replyHelp() val formerVolume = player.volume + + if (num > 150) num = 150 player.volume = num + reply("Changed volume from ${formerVolume}% to ${player.volume}%.") } @@ -26,4 +29,4 @@ class VolumeCommand(val players: PlayerRegistry) : Command("volume", "v") { addUsage("<0-150>%") addDescription("Sets the volume to the given percentage.") } -} \ No newline at end of file +}