From cb953a1619795eb9ded2f29e69455409317ca967 Mon Sep 17 00:00:00 2001 From: GJ Date: Fri, 3 May 2013 07:27:51 -0400 Subject: [PATCH] Disable global chat spam from the kraken by setting the server message to an empty string in the config. --- .../com/gmail/nossr50/skills/fishing/FishingManager.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java b/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java index 9679bb024..440d7fc4f 100644 --- a/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java +++ b/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java @@ -5,6 +5,7 @@ import java.util.Collections; import java.util.List; import org.bukkit.ChatColor; +import org.bukkit.Effect; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.Sound; @@ -91,7 +92,12 @@ public class FishingManager extends SkillManager { world.strikeLightningEffect(location); player.sendMessage(AdvancedConfig.getInstance().getPlayerUnleashMessage()); world.playSound(location, Sound.GHAST_SCREAM, Misc.GHAST_VOLUME, Misc.getGhastPitch()); - mcMMO.p.getServer().broadcastMessage(AdvancedConfig.getInstance().getServerUnleashMessage().replace("(PLAYER)", player.getDisplayName() + ChatColor.RED)); + + String globalMessage = AdvancedConfig.getInstance().getServerUnleashMessage(); + + if (!globalMessage.isEmpty()) { + mcMMO.p.getServer().broadcastMessage(AdvancedConfig.getInstance().getServerUnleashMessage().replace("(PLAYER)", player.getDisplayName() + ChatColor.RED)); + } Squid kraken = (Squid) world.spawnEntity(player.getEyeLocation(), EntityType.SQUID); kraken.setCustomName(AdvancedConfig.getInstance().getKrakenName());