diff --git a/src/main/java/com/volmit/iris/util/decree/DecreeSystem.java b/src/main/java/com/volmit/iris/util/decree/DecreeSystem.java index 0cfc03072..0a8bfd498 100644 --- a/src/main/java/com/volmit/iris/util/decree/DecreeSystem.java +++ b/src/main/java/com/volmit/iris/util/decree/DecreeSystem.java @@ -19,6 +19,7 @@ package com.volmit.iris.util.decree; import com.volmit.iris.Iris; +import com.volmit.iris.core.IrisSettings; import com.volmit.iris.util.collection.KList; import com.volmit.iris.util.decree.virtual.VirtualDecreeCommand; import com.volmit.iris.util.format.C; @@ -60,7 +61,10 @@ public interface DecreeSystem extends CommandExecutor, TabCompleter { if(sender instanceof Player) { - ((Player)sender).playSound(((Player)sender).getLocation(), Sound.BLOCK_AMETHYST_BLOCK_CHIME, 0.25f, RNG.r.f(0.125f, 1.95f)); + if(IrisSettings.get().getGeneral().isCommandSounds()) + { + ((Player)sender).playSound(((Player)sender).getLocation(), Sound.BLOCK_AMETHYST_BLOCK_CHIME, 0.25f, RNG.r.f(0.125f, 1.95f)); + } } return v; @@ -75,10 +79,14 @@ public interface DecreeSystem extends CommandExecutor, TabCompleter { J.aBukkit(() -> { if (!call(new VolmitSender(sender), args)) { - if(sender instanceof Player) + + if(IrisSettings.get().getGeneral().isCommandSounds()) { - ((Player)sender).playSound(((Player)sender).getLocation(), Sound.BLOCK_ANCIENT_DEBRIS_BREAK, 1f, 0.25f); - ((Player)sender).playSound(((Player)sender).getLocation(), Sound.BLOCK_RESPAWN_ANCHOR_DEPLETE, 0.2f, 1.95f); + if(sender instanceof Player) + { + ((Player)sender).playSound(((Player)sender).getLocation(), Sound.BLOCK_ANCIENT_DEBRIS_BREAK, 1f, 0.25f); + ((Player)sender).playSound(((Player)sender).getLocation(), Sound.BLOCK_RESPAWN_ANCHOR_DEPLETE, 0.2f, 1.95f); + } } sender.sendMessage(C.RED + "Unknown Iris Command"); @@ -86,10 +94,13 @@ public interface DecreeSystem extends CommandExecutor, TabCompleter { else { - if(sender instanceof Player) + if(IrisSettings.get().getGeneral().isCommandSounds()) { - ((Player)sender).playSound(((Player)sender).getLocation(), Sound.BLOCK_AMETHYST_CLUSTER_BREAK, 0.77f, 1.65f); - ((Player)sender).playSound(((Player)sender).getLocation(), Sound.BLOCK_RESPAWN_ANCHOR_CHARGE, 0.125f, 2.99f); + if(sender instanceof Player) + { + ((Player)sender).playSound(((Player)sender).getLocation(), Sound.BLOCK_AMETHYST_CLUSTER_BREAK, 0.77f, 1.65f); + ((Player)sender).playSound(((Player)sender).getLocation(), Sound.BLOCK_RESPAWN_ANCHOR_CHARGE, 0.125f, 2.99f); + } } } });