1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-16 19:44:15 +02:00

Show player not found message, if no unhidden player is found in /msg

This commit is contained in:
snowleo
2011-07-20 21:36:23 +02:00
parent ea3a2f030c
commit cdff1649c3

View File

@@ -49,6 +49,21 @@ public class Commandmsg extends EssentialsCommand
return; return;
} }
int i = 0;
for (Player p : matches)
{
final User u = ess.getUser(p);
if (u.isHidden())
{
i++;
}
}
if (i == matches.size())
{
sender.sendMessage(Util.i18n("playerNotFound"));
return;
}
charge(sender); charge(sender);
for (Player p : matches) for (Player p : matches)
{ {