ChatNotifier: don't notify the sender
This commit is contained in:
parent
2191b94b9a
commit
938640f203
@ -20,7 +20,7 @@ public class ChatNotifier extends Feature {
|
|||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
for (Player p : plugin.getServer().getOnlinePlayers()) {
|
for (Player p : plugin.getServer().getOnlinePlayers()) {
|
||||||
String msg = e.getMessage();
|
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;
|
msg = ChatColor.RED + msg;
|
||||||
// ActionBarAPI.sendActionBar(p, ChatColor.RED + "Byl jsi zminen v chatu", 80);
|
// ActionBarAPI.sendActionBar(p, ChatColor.RED + "Byl jsi zminen v chatu", 80);
|
||||||
p.playSound(p.getLocation(), Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1.0F, 3.0F);
|
p.playSound(p.getLocation(), Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1.0F, 3.0F);
|
||||||
|
Loading…
Reference in New Issue
Block a user