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);