From 938640f2033e3bf3a4d01d6f8ecde62372220df0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Bro=C4=8Dko?= Date: Thu, 6 Sep 2018 21:59:26 +0200 Subject: [PATCH] ChatNotifier: don't notify the sender --- 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 37836d1..26a25c0 100644 --- a/src/cz/marwland/mc/essentials/features/ChatNotifier.java +++ b/src/cz/marwland/mc/essentials/features/ChatNotifier.java @@ -20,7 +20,7 @@ public class ChatNotifier extends Feature { e.setCancelled(true); for (Player p : plugin.getServer().getOnlinePlayers()) { String msg = e.getMessage(); - if (e.getMessage().toLowerCase().contains(p.getName().toLowerCase())) { + if (e.getMessage().toLowerCase().contains(p.getName().toLowerCase()) && p.getPlayer() != e.getPlayer()) { msg = ChatColor.RED + msg; // ActionBarAPI.sendActionBar(p, ChatColor.RED + "Byl jsi zminen v chatu", 80); p.playSound(p.getLocation(), Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1.0F, 3.0F);