diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/SoundUtils.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/SoundUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/SoundUtils.kt index 70e6242c6..79e320949 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/SoundUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/SoundUtils.kt @@ -20,6 +20,7 @@ object SoundUtils { fun ISound.playSound() { Minecraft.getMinecraft().addScheduledTask { + if (Minecraft.getMinecraft().soundHandler.isSoundPlaying(this)) return@addScheduledTask val gameSettings = Minecraft.getMinecraft().gameSettings val oldLevel = gameSettings.getSoundLevel(SoundCategory.PLAYERS) if (!SkyHanniMod.feature.misc.maintainGameVolume) { @@ -38,7 +39,7 @@ object SoundUtils { } ErrorManager.logErrorWithData( e, "Failed to play a sound", - "soundLocation" to this.soundLocation + "soundLocation" to this.soundLocation, ) } finally { if (!SkyHanniMod.feature.misc.maintainGameVolume) { |