mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Add sound for level-up even when not using Spout.
This commit is contained in:
parent
816b08b14a
commit
e8bc2475c3
@ -45,6 +45,8 @@ public final class Misc {
|
|||||||
public static final float BAT_VOLUME = 1.0F;
|
public static final float BAT_VOLUME = 1.0F;
|
||||||
public static final float BAT_PITCH = 0.6F;
|
public static final float BAT_PITCH = 0.6F;
|
||||||
public static final float GHAST_VOLUME = 1.0F;
|
public static final float GHAST_VOLUME = 1.0F;
|
||||||
|
public static final float LEVELUP_PITCH = 0.5F; // Reduced to differentiate between vanilla level-up
|
||||||
|
public static final float LEVELUP_VOLUME = 0.75F; // Use max volume always
|
||||||
|
|
||||||
private Misc() {};
|
private Misc() {};
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.enchantments.Enchantment;
|
import org.bukkit.enchantments.Enchantment;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -166,6 +167,7 @@ public class SkillUtils {
|
|||||||
SpoutUtils.processLevelup(mcMMOPlayer, skillType, levelsGained);
|
SpoutUtils.processLevelup(mcMMOPlayer, skillType, levelsGained);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
player.playSound(player.getLocation(), Sound.LEVEL_UP, Misc.LEVELUP_VOLUME, Misc.LEVELUP_PITCH);
|
||||||
player.sendMessage(LocaleLoader.getString(capitalized + ".Skillup", levelsGained, profile.getSkillLevel(skillType)));
|
player.sendMessage(LocaleLoader.getString(capitalized + ".Skillup", levelsGained, profile.getSkillLevel(skillType)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user