From bd343888bbc318c08b87601d04126135f2ce0a2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Bro=C4=8Dko?= Date: Sat, 8 Sep 2018 02:29:02 +0200 Subject: [PATCH] ChatNotifier: remove recipient instead of cancelling the event --- src/cz/marwland/mc/essentials/features/ChatNotifier.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cz/marwland/mc/essentials/features/ChatNotifier.java b/src/cz/marwland/mc/essentials/features/ChatNotifier.java index 93e2a74..838495a 100644 --- a/src/cz/marwland/mc/essentials/features/ChatNotifier.java +++ b/src/cz/marwland/mc/essentials/features/ChatNotifier.java @@ -19,10 +19,10 @@ public class ChatNotifier extends Feature { @EventHandler public void onPlayerChat(AsyncPlayerChatEvent e) { - e.setCancelled(true); for (Player p : plugin.getServer().getOnlinePlayers()) { String msg = e.getMessage(); if (e.getMessage().toLowerCase().contains(p.getName().toLowerCase()) && p.getPlayer() != e.getPlayer()) { + e.getRecipients().remove(p); msg = ChatColor.RED + msg; BountifulAPI.sendActionBar(p, ChatColor.RED + "Byl jsi zminen v chatu!"); p.playSound(p.getLocation(), Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1.0F, 3.0F);