From aa455e373df25daa5f296af80ec94e2b9bff01eb Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Mon, 30 Sep 2019 11:52:32 +0200 Subject: [PATCH] Only send the message to the same group #106 --- .../chat/components/formatter/ChatProcessing.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/buttondevteam/chat/components/formatter/ChatProcessing.java b/src/main/java/buttondevteam/chat/components/formatter/ChatProcessing.java index 333048c..e94372c 100644 --- a/src/main/java/buttondevteam/chat/components/formatter/ChatProcessing.java +++ b/src/main/java/buttondevteam/chat/components/formatter/ChatProcessing.java @@ -174,7 +174,7 @@ public class ChatProcessing { try { if (!channel.isGlobal()) { String senderGroup = e.getGroupID(sender); - if (senderGroup == null) { // Never send messages to score below 0 + if (senderGroup == null) { // Never send messages if the group is null sender.sendMessage("§cYou don't have permission to send this message or something went wrong"); return true; } @@ -187,7 +187,7 @@ public class ChatProcessing { group = null; // Don't send the message to them else group = VanillaUtils.getGroupIfChatOn(p, e); - if (group != null) + if (senderGroup.equals(group)) VanillaUtils.tellRaw(p, jsonstr); else if (tc != null) tc.handleSpies(channel, p); //Only sends if didn't send normally