mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 03:34:43 +02:00
Kraken sounds can now be set to either player-only or global (default).
This commit is contained in:
@ -13,6 +13,7 @@ import com.gmail.nossr50.util.Misc;
|
||||
public class KrakenAttackTask extends BukkitRunnable {
|
||||
private Squid kraken;
|
||||
private Player player;
|
||||
private final boolean GLOBAL_SOUNDS = AdvancedConfig.getInstance().getKrakenGlobalSoundsEnabled();
|
||||
|
||||
public KrakenAttackTask(Squid kraken, Player player) {
|
||||
this.kraken = kraken;
|
||||
@ -31,6 +32,14 @@ public class KrakenAttackTask extends BukkitRunnable {
|
||||
|
||||
kraken.teleport(player);
|
||||
player.damage(AdvancedConfig.getInstance().getKrakenAttackDamage(), kraken);
|
||||
|
||||
if (GLOBAL_SOUNDS) {
|
||||
world.playSound(location, Sound.GHAST_SCREAM, Misc.GHAST_VOLUME, Misc.getGhastPitch());
|
||||
}
|
||||
else {
|
||||
player.playSound(location, Sound.GHAST_SCREAM, Misc.GHAST_VOLUME, Misc.getGhastPitch());
|
||||
}
|
||||
|
||||
world.playSound(location, Sound.GHAST_SCREAM, Misc.GHAST_VOLUME, Misc.getGhastPitch());
|
||||
world.strikeLightningEffect(location);
|
||||
}
|
||||
|
Reference in New Issue
Block a user