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) { public void broadcastToGame(final String message, final String permission) {
getServer().getPluginManager().callEvent(new IRCMessageEvent(message, permission)); getServer().getPluginManager().callEvent(new IRCMessageEvent(message, permission));
String fixedMessage = message.replace("\u200B", "");
if (broadcastChatToConsole) { if (broadcastChatToConsole) {
logDebug("Broadcast All [" + permission + "]: " + message); logDebug("Broadcast All [" + permission + "]: " + fixedMessage);
getServer().broadcast(message, permission); getServer().broadcast(fixedMessage, permission);
} else { } else {
logDebug("Broadcast Players [" + permission + "]: " + message); logDebug("Broadcast Players [" + permission + "]: " + fixedMessage);
for (Player player : getServer().getOnlinePlayers()) { for (Player player : getServer().getOnlinePlayers()) {
if (player.hasPermission(permission)) { if (player.hasPermission(permission)) {
player.sendMessage(message); player.sendMessage(fixedMessage);
} }
} }
} }