mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
Kraken sounds can now be set to either player-only or global (default).
This commit is contained in:
parent
499713c8e7
commit
09abab1b5d
@ -283,6 +283,7 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
|
|
||||||
/* KRAKEN STUFF */
|
/* KRAKEN STUFF */
|
||||||
public boolean getKrakenEnabled() { return config.getBoolean("Kraken.Enabled", true); }
|
public boolean getKrakenEnabled() { return config.getBoolean("Kraken.Enabled", true); }
|
||||||
|
public boolean getKrakenGlobalSoundsEnabled() { return config.getBoolean("Kraken.Global_Sounds", true); }
|
||||||
public int getKrakenTriesBeforeRelease() { return config.getInt("Kraken.Tries_Before_Release", 50); }
|
public int getKrakenTriesBeforeRelease() { return config.getInt("Kraken.Tries_Before_Release", 50); }
|
||||||
public int getKrakenHealth() { return config.getInt("Kraken.Health", 50); }
|
public int getKrakenHealth() { return config.getInt("Kraken.Health", 50); }
|
||||||
public String getKrakenName() { return config.getString("Kraken.Name", "The Kraken"); }
|
public String getKrakenName() { return config.getString("Kraken.Name", "The Kraken"); }
|
||||||
|
@ -13,6 +13,7 @@ import com.gmail.nossr50.util.Misc;
|
|||||||
public class KrakenAttackTask extends BukkitRunnable {
|
public class KrakenAttackTask extends BukkitRunnable {
|
||||||
private Squid kraken;
|
private Squid kraken;
|
||||||
private Player player;
|
private Player player;
|
||||||
|
private final boolean GLOBAL_SOUNDS = AdvancedConfig.getInstance().getKrakenGlobalSoundsEnabled();
|
||||||
|
|
||||||
public KrakenAttackTask(Squid kraken, Player player) {
|
public KrakenAttackTask(Squid kraken, Player player) {
|
||||||
this.kraken = kraken;
|
this.kraken = kraken;
|
||||||
@ -31,6 +32,14 @@ public class KrakenAttackTask extends BukkitRunnable {
|
|||||||
|
|
||||||
kraken.teleport(player);
|
kraken.teleport(player);
|
||||||
player.damage(AdvancedConfig.getInstance().getKrakenAttackDamage(), kraken);
|
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.playSound(location, Sound.GHAST_SCREAM, Misc.GHAST_VOLUME, Misc.getGhastPitch());
|
||||||
world.strikeLightningEffect(location);
|
world.strikeLightningEffect(location);
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,13 @@ public class FishingManager extends SkillManager {
|
|||||||
world.strikeLightningEffect(location);
|
world.strikeLightningEffect(location);
|
||||||
world.strikeLightningEffect(location);
|
world.strikeLightningEffect(location);
|
||||||
player.sendMessage(AdvancedConfig.getInstance().getPlayerUnleashMessage());
|
player.sendMessage(AdvancedConfig.getInstance().getPlayerUnleashMessage());
|
||||||
|
|
||||||
|
if (AdvancedConfig.getInstance().getKrakenGlobalSoundsEnabled()) {
|
||||||
world.playSound(location, Sound.GHAST_SCREAM, Misc.GHAST_VOLUME, Misc.getGhastPitch());
|
world.playSound(location, Sound.GHAST_SCREAM, Misc.GHAST_VOLUME, Misc.getGhastPitch());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
player.playSound(location, Sound.GHAST_SCREAM, Misc.GHAST_VOLUME, Misc.getGhastPitch());
|
||||||
|
}
|
||||||
|
|
||||||
String globalMessage = AdvancedConfig.getInstance().getServerUnleashMessage();
|
String globalMessage = AdvancedConfig.getInstance().getServerUnleashMessage();
|
||||||
|
|
||||||
|
@ -422,6 +422,7 @@ Kraken:
|
|||||||
Name: The Kraken
|
Name: The Kraken
|
||||||
Attack_Interval_Seconds: 1
|
Attack_Interval_Seconds: 1
|
||||||
Attack_Damage: 1
|
Attack_Damage: 1
|
||||||
|
Global_Sounds: true
|
||||||
Unleashed_Message:
|
Unleashed_Message:
|
||||||
Server: (PLAYER) has unleashed the kraken!
|
Server: (PLAYER) has unleashed the kraken!
|
||||||
Player: THE KRAKEN HAS BEEN UNLEASHED!
|
Player: THE KRAKEN HAS BEEN UNLEASHED!
|
Loading…
Reference in New Issue
Block a user