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 377f967dab
commit bda2f5e615

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