From fd72e2de91e412eb427b2da29c63cd8019ea8f21 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Tue, 18 Dec 2018 00:52:56 +0100 Subject: [PATCH] No filteranderrormsg --- src/main/java/buttondevteam/chat/ChatProcessing.java | 2 +- src/main/java/buttondevteam/chat/listener/PlayerListener.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/buttondevteam/chat/ChatProcessing.java b/src/main/java/buttondevteam/chat/ChatProcessing.java index 42ebf10..02fe85c 100644 --- a/src/main/java/buttondevteam/chat/ChatProcessing.java +++ b/src/main/java/buttondevteam/chat/ChatProcessing.java @@ -145,7 +145,7 @@ public class ChatProcessing { DebugCommand.SendDebugMessage(jsonstr); try { - if (channel.filteranderrormsg != null) { + if (!channel.isGlobal()) { Objective obj = PluginMain.SB.getObjective(channel.ID); int score = -1; for (Player p : Bukkit.getOnlinePlayers()) { diff --git a/src/main/java/buttondevteam/chat/listener/PlayerListener.java b/src/main/java/buttondevteam/chat/listener/PlayerListener.java index 4997347..2304407 100644 --- a/src/main/java/buttondevteam/chat/listener/PlayerListener.java +++ b/src/main/java/buttondevteam/chat/listener/PlayerListener.java @@ -272,7 +272,7 @@ public class PlayerListener implements Listener { @EventHandler public void onChannelRegistered(ChatChannelRegisterEvent e) { - if (e.getChannel().filteranderrormsg != null && PluginMain.SB.getObjective(e.getChannel().ID) == null) // Not global chat and doesn't exist yet + if (!e.getChannel().isGlobal() && PluginMain.SB.getObjective(e.getChannel().ID) == null) // Not global chat and doesn't exist yet PluginMain.SB.registerNewObjective(e.getChannel().ID, "dummy"); }