Make mcMMO anvil sounds categorized (#4954)

Default anvil sound is way too loud, and being in the master category
makes it hard to manage player-side without making the entire game too
soft.
This commit is contained in:
MithicSpirit 2023-12-21 20:54:29 -05:00 committed by GitHub
parent 65dfcb492d
commit 347e6112fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,6 +23,7 @@ import com.gmail.nossr50.util.sounds.SoundManager;
import com.gmail.nossr50.util.sounds.SoundType;
import com.gmail.nossr50.util.text.StringUtils;
import org.bukkit.Material;
import org.bukkit.SoundCategory;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
@ -57,7 +58,7 @@ public class RepairManager extends SkillManager {
}
if (mcMMO.p.getGeneralConfig().getRepairAnvilPlaceSoundsEnabled()) {
SoundManager.sendSound(player, player.getLocation(), SoundType.ANVIL);
SoundManager.sendCategorizedSound(player, player.getLocation(), SoundType.ANVIL, SoundCategory.BLOCKS);
}
togglePlacedAnvil();
@ -184,8 +185,8 @@ public class RepairManager extends SkillManager {
// BWONG BWONG BWONG
if (mcMMO.p.getGeneralConfig().getRepairAnvilUseSoundsEnabled()) {
SoundManager.sendSound(player, player.getLocation(), SoundType.ANVIL);
SoundManager.sendSound(player, player.getLocation(), SoundType.ITEM_BREAK);
SoundManager.sendCategorizedSound(player, player.getLocation(), SoundType.ANVIL, SoundCategory.BLOCKS);
SoundManager.sendCategorizedSound(player, player.getLocation(), SoundType.ITEM_BREAK, SoundCategory.PLAYERS);
}
// Repair the item!