mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 06:06:45 +01:00
Make mcMMO anvil sounds categorized
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:
parent
89b895af81
commit
00564d69dd
@ -23,6 +23,7 @@ import com.gmail.nossr50.util.sounds.SoundManager;
|
|||||||
import com.gmail.nossr50.util.sounds.SoundType;
|
import com.gmail.nossr50.util.sounds.SoundType;
|
||||||
import com.gmail.nossr50.util.text.StringUtils;
|
import com.gmail.nossr50.util.text.StringUtils;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.SoundCategory;
|
||||||
import org.bukkit.enchantments.Enchantment;
|
import org.bukkit.enchantments.Enchantment;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
@ -57,7 +58,7 @@ public class RepairManager extends SkillManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mcMMO.p.getGeneralConfig().getRepairAnvilPlaceSoundsEnabled()) {
|
if (mcMMO.p.getGeneralConfig().getRepairAnvilPlaceSoundsEnabled()) {
|
||||||
SoundManager.sendSound(player, player.getLocation(), SoundType.ANVIL);
|
SoundManager.sendCategorizedSound(player, player.getLocation(), SoundType.ANVIL, SoundCategory.BLOCKS);
|
||||||
}
|
}
|
||||||
|
|
||||||
togglePlacedAnvil();
|
togglePlacedAnvil();
|
||||||
@ -160,7 +161,7 @@ public class RepairManager extends SkillManager {
|
|||||||
toRemove = possibleMaterial.get().clone();
|
toRemove = possibleMaterial.get().clone();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Call event
|
// Call event
|
||||||
if (EventUtils.callRepairCheckEvent(player, (short) (startDurability - newDurability), toRemove, item).isCancelled()) {
|
if (EventUtils.callRepairCheckEvent(player, (short) (startDurability - newDurability), toRemove, item).isCancelled()) {
|
||||||
return;
|
return;
|
||||||
@ -184,8 +185,8 @@ public class RepairManager extends SkillManager {
|
|||||||
|
|
||||||
// BWONG BWONG BWONG
|
// BWONG BWONG BWONG
|
||||||
if (mcMMO.p.getGeneralConfig().getRepairAnvilUseSoundsEnabled()) {
|
if (mcMMO.p.getGeneralConfig().getRepairAnvilUseSoundsEnabled()) {
|
||||||
SoundManager.sendSound(player, player.getLocation(), SoundType.ANVIL);
|
SoundManager.sendCategorizedSound(player, player.getLocation(), SoundType.ANVIL, SoundCategory.BLOCKS);
|
||||||
SoundManager.sendSound(player, player.getLocation(), SoundType.ITEM_BREAK);
|
SoundManager.sendCategorizedSound(player, player.getLocation(), SoundType.ITEM_BREAK, SoundCategory.PLAYERS);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Repair the item!
|
// Repair the item!
|
||||||
|
Loading…
Reference in New Issue
Block a user