Config option for escaping from the Kraken.

This commit is contained in:
GJ 2013-05-14 12:42:18 -04:00
parent ad39c94773
commit f10b3cef01
3 changed files with 3 additions and 1 deletions

View File

@ -284,6 +284,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 boolean getKrakenGlobalSoundsEnabled() { return config.getBoolean("Kraken.Global_Sounds", true); }
public boolean getKrakenEscapeAllowed() { return config.getBoolean("Kraken.Allow_Escaping", false); }
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"); }

View File

@ -64,7 +64,7 @@ public class KrakenAttackTask extends BukkitRunnable {
if (player.isValid()) { if (player.isValid()) {
Location location = player.getLocation(); Location location = player.getLocation();
if (!location.getBlock().isLiquid()) { if (!location.getBlock().isLiquid() && AdvancedConfig.getInstance().getKrakenEscapeAllowed()) {
player.sendMessage(AdvancedConfig.getInstance().getPlayerEscapeMessage()); player.sendMessage(AdvancedConfig.getInstance().getPlayerEscapeMessage());
kraken.remove(); kraken.remove();
player.resetPlayerWeather(); player.resetPlayerWeather();

View File

@ -423,6 +423,7 @@ Kraken:
Attack_Interval_Seconds: 1 Attack_Interval_Seconds: 1
Attack_Damage: 1 Attack_Damage: 1
Global_Sounds: true Global_Sounds: true
Allow_Escaping: false
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!