summaryrefslogtreecommitdiffstats
path: root/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java
diff options
context:
space:
mode:
Diffstat (limited to 'Essentials/src/com/earth2me/essentials/commands/Commandmsg.java')
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandmsg.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java b/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java
index 2e1011e3b..fe39a1c04 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java
@@ -21,11 +21,11 @@ public class Commandmsg extends EssentialsCommand
@Override
public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
{
- if (args.length < 2 || args[0].trim().isEmpty() || args[1].trim().isEmpty())
+ if (args.length < 2 || args[0].trim().length() < 3 || args[1].trim().isEmpty())
{
throw new NotEnoughArgumentsException();
}
-
+
String message = getFinalArg(args, 1);
if (sender instanceof Player)
{
@@ -81,7 +81,7 @@ public class Commandmsg extends EssentialsCommand
{
sender.sendMessage(_("msgFormat", translatedMe, matchedPlayer.getDisplayName(), message));
final User matchedUser = ess.getUser(matchedPlayer);
- if (sender instanceof Player && (matchedUser.isIgnoredPlayer(((Player)sender).getName()) || matchedUser.isHidden()))
+ if (sender instanceof Player && (matchedUser.isIgnoredPlayer(ess.getUser(sender)) || matchedUser.isHidden()))
{
continue;
}