9
0
mirror of https://github.com/Auxilor/EcoArmor.git synced 2025-12-27 19:09:13 +00:00

Merge pull request #22 from ltjessem/fix

Fix #20
This commit is contained in:
Will FP
2022-06-14 08:20:43 +01:00
committed by GitHub
2 changed files with 11 additions and 11 deletions

View File

@@ -88,22 +88,22 @@ class ArmorSet(
/*
* Advanced equip Sound
*/
val advancedEquipSound = if (config.getBool("sounds.equip.enabled")) {
val advancedEquipSound = if (config.getBool("sounds.advancedEquip.enabled")) {
PlayableSound(
Sound.valueOf(config.getString("sounds.equip.sound").uppercase()),
config.getDouble("sounds.equip.volume"),
config.getDouble("sounds.equip.pitch")
Sound.valueOf(config.getString("sounds.advancedEquip.sound").uppercase()),
config.getDouble("sounds.advancedEquip.volume"),
config.getDouble("sounds.advancedEquip.pitch")
)
} else null
/*
* Unequip Sound
*/
val unequipSound = if (config.getBool("sounds.equip.enabled")) {
val unequipSound = if (config.getBool("sounds.unequip.enabled")) {
PlayableSound(
Sound.valueOf(config.getString("sounds.equip.sound").uppercase()),
config.getDouble("sounds.equip.volume"),
config.getDouble("sounds.equip.pitch")
Sound.valueOf(config.getString("sounds.unequip.sound").uppercase()),
config.getDouble("sounds.unequip.volume"),
config.getDouble("sounds.unequip.pitch")
)
} else null

View File

@@ -5,10 +5,10 @@ import org.bukkit.entity.Player
class PlayableSound(
private val sound: Sound,
private val pitch: Double,
val volume: Double
val volume: Double,
private val pitch: Double
) {
fun play(player: Player) {
player.playSound(player.location, sound, volume.toFloat(), pitch.toFloat())
}
}
}