mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 16:46:46 +01:00
Disable global chat spam from the kraken by setting the server message
to an empty string in the config.
This commit is contained in:
parent
3ab4938f3d
commit
cb953a1619
@ -5,6 +5,7 @@ import java.util.Collections;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.Effect;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
@ -91,7 +92,12 @@ public class FishingManager extends SkillManager {
|
|||||||
world.strikeLightningEffect(location);
|
world.strikeLightningEffect(location);
|
||||||
player.sendMessage(AdvancedConfig.getInstance().getPlayerUnleashMessage());
|
player.sendMessage(AdvancedConfig.getInstance().getPlayerUnleashMessage());
|
||||||
world.playSound(location, Sound.GHAST_SCREAM, Misc.GHAST_VOLUME, Misc.getGhastPitch());
|
world.playSound(location, Sound.GHAST_SCREAM, Misc.GHAST_VOLUME, Misc.getGhastPitch());
|
||||||
|
|
||||||
|
String globalMessage = AdvancedConfig.getInstance().getServerUnleashMessage();
|
||||||
|
|
||||||
|
if (!globalMessage.isEmpty()) {
|
||||||
mcMMO.p.getServer().broadcastMessage(AdvancedConfig.getInstance().getServerUnleashMessage().replace("(PLAYER)", player.getDisplayName() + ChatColor.RED));
|
mcMMO.p.getServer().broadcastMessage(AdvancedConfig.getInstance().getServerUnleashMessage().replace("(PLAYER)", player.getDisplayName() + ChatColor.RED));
|
||||||
|
}
|
||||||
|
|
||||||
Squid kraken = (Squid) world.spawnEntity(player.getEyeLocation(), EntityType.SQUID);
|
Squid kraken = (Squid) world.spawnEntity(player.getEyeLocation(), EntityType.SQUID);
|
||||||
kraken.setCustomName(AdvancedConfig.getInstance().getKrakenName());
|
kraken.setCustomName(AdvancedConfig.getInstance().getKrakenName());
|
||||||
|
Loading…
Reference in New Issue
Block a user