Don't send zws to game.

This commit is contained in:
cnaude 2015-12-13 21:14:58 -07:00
parent 00fb65c20d
commit 7ec6e42e60

View File

@ -1663,14 +1663,15 @@ public class PurpleIRC extends JavaPlugin {
public void broadcastToGame(final String message, final String permission) {
getServer().getPluginManager().callEvent(new IRCMessageEvent(message, permission));
String fixedMessage = message.replace("\u200B", "");
if (broadcastChatToConsole) {
logDebug("Broadcast All [" + permission + "]: " + message);
getServer().broadcast(message, permission);
logDebug("Broadcast All [" + permission + "]: " + fixedMessage);
getServer().broadcast(fixedMessage, permission);
} else {
logDebug("Broadcast Players [" + permission + "]: " + message);
logDebug("Broadcast Players [" + permission + "]: " + fixedMessage);
for (Player player : getServer().getOnlinePlayers()) {
if (player.hasPermission(permission)) {
player.sendMessage(message);
player.sendMessage(fixedMessage);
}
}
}