Changed kraken default behavior

It will no longer broadcast chat messages globally by default, as well as strike lightning on it's target. Instead it will spawn explosion effects.
This commit is contained in:
TfT_02
2013-10-20 16:38:51 +02:00
parent 810c74dc2a
commit d410251595
5 changed files with 36 additions and 40 deletions

View File

@ -103,31 +103,31 @@ public class FishingManager extends SkillManager {
player.teleport(player.getTargetBlock(null, 100).getLocation(), TeleportCause.PLUGIN);
Location location = player.getLocation();
world.strikeLightningEffect(location);
world.strikeLightningEffect(location);
world.strikeLightningEffect(location);
String unleashMessage = AdvancedConfig.getInstance().getPlayerUnleashMessage();
if (!unleashMessage.isEmpty()) {
player.sendMessage(unleashMessage);
}
if (AdvancedConfig.getInstance().getKrakenGlobalSoundsEnabled()) {
Location location = player.getLocation();
boolean globalEffectsEnabled = AdvancedConfig.getInstance().getKrakenGlobalEffectsEnabled();
if (globalEffectsEnabled) {
world.strikeLightningEffect(location);
world.strikeLightningEffect(location);
world.strikeLightningEffect(location);
world.playSound(location, Sound.GHAST_SCREAM, Misc.GHAST_VOLUME, Misc.getGhastPitch());
mcMMO.p.getServer().broadcastMessage(ChatColor.RED + AdvancedConfig.getInstance().getServerUnleashMessage().replace("(PLAYER)", player.getDisplayName()));
}
else {
world.createExplosion(location.getX(), location.getY(), location.getZ(), 0F, false, false);
world.createExplosion(location.getX(), location.getY(), location.getZ(), 0F, false, false);
world.createExplosion(location.getX(), location.getY(), location.getZ(), 0F, false, false);
player.playSound(location, Sound.GHAST_SCREAM, Misc.GHAST_VOLUME, Misc.getGhastPitch());
}
String globalMessage = AdvancedConfig.getInstance().getServerUnleashMessage();
if (!globalMessage.isEmpty()) {
mcMMO.p.getServer().broadcastMessage(ChatColor.RED + AdvancedConfig.getInstance().getServerUnleashMessage().replace("(PLAYER)", player.getDisplayName()));
}
if (player.getItemInHand().getType() == Material.FISHING_ROD) {
player.setItemInHand(null);
}