diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-04-19 21:31:04 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-04-19 21:31:04 +0200 |
commit | b6286ff5856d445c812b51213501c1388ef5f1f9 (patch) | |
tree | cba034613769272abb840c3f6c81e532bd48714a /src/main/java/at/hannibal2 | |
parent | b6df5621a3e020f24d5897ee58b0e93edd0c62f7 (diff) | |
download | skyhanni-b6286ff5856d445c812b51213501c1388ef5f1f9.tar.gz skyhanni-b6286ff5856d445c812b51213501c1388ef5f1f9.tar.bz2 skyhanni-b6286ff5856d445c812b51213501c1388ef5f1f9.zip |
code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/command/TrackSoundsCommand.kt | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/TrackSoundsCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/TrackSoundsCommand.kt index b925950ed..4742bd45d 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/TrackSoundsCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/TrackSoundsCommand.kt @@ -112,14 +112,18 @@ object TrackSoundsCommand { } } else { val sound = value.first() - val volumeColor = when(sound.volume) { - in 0.0..0.25 -> ChatFormatting.RED.toString() - in 0.25..0.5 -> ChatFormatting.GOLD.toString() - else -> ChatFormatting.GREEN.toString() - } + val volumeColor = when (sound.volume) { + in 0.0..0.25 -> ChatFormatting.RED + in 0.25..0.5 -> ChatFormatting.GOLD + else -> ChatFormatting.GREEN + }.toString() event.drawDynamicText(key, "§7§l${sound.soundName}", 0.8) - event.drawDynamicText(key.up(-0.2), "§7P: §e%.2f §7V: $volumeColor%.2f".format(sound.pitch, sound.volume), 0.8) + event.drawDynamicText( + key.up(-0.2), + "§7P: §e%.2f §7V: $volumeColor%.2f".format(sound.pitch, sound.volume), + scaleMultiplier = 0.8 + ) } } } |