diff options
author | Chris Ward <chris@chrisgward.com> | 2013-10-19 19:06:42 +1100 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2013-10-19 12:19:39 +0100 |
commit | 0ba3afe881f53951c6f36ae46b2400aebdc9f5f4 (patch) | |
tree | 9d14b7fc6dfd8969398f0b07026d106d3c335772 | |
parent | d84fb870bf45e4fddee9f429d8c0d780dc44abb4 (diff) | |
download | Essentials-0ba3afe881f53951c6f36ae46b2400aebdc9f5f4.tar Essentials-0ba3afe881f53951c6f36ae46b2400aebdc9f5f4.tar.gz Essentials-0ba3afe881f53951c6f36ae46b2400aebdc9f5f4.tar.lz Essentials-0ba3afe881f53951c6f36ae46b2400aebdc9f5f4.tar.xz Essentials-0ba3afe881f53951c6f36ae46b2400aebdc9f5f4.zip |
Make looping commands see vanished players properly
Make /r check player existence in the correct order
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandr.java | 3 | ||||
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/EssentialsLoopCommand.java | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandr.java b/Essentials/src/com/earth2me/essentials/commands/Commandr.java index 4b4de6ff9..1a793556a 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandr.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandr.java @@ -44,13 +44,14 @@ public class Commandr extends EssentialsCommand } final CommandSource target = replyTo.getReplyTo(); - final String targetName = target.isPlayer() ? target.getPlayer().getDisplayName() : Console.NAME; if (target == null || (target.isPlayer() && !target.getPlayer().isOnline())) { throw new Exception(_("foreverAlone")); } + final String targetName = target.isPlayer() ? target.getPlayer().getDisplayName() : Console.NAME; + sender.sendMessage(_("msgFormat", _("me"), targetName, message)); if (target.isPlayer()) { diff --git a/Essentials/src/com/earth2me/essentials/commands/EssentialsLoopCommand.java b/Essentials/src/com/earth2me/essentials/commands/EssentialsLoopCommand.java index 2a7ebddde..c34fe8bd6 100644 --- a/Essentials/src/com/earth2me/essentials/commands/EssentialsLoopCommand.java +++ b/Essentials/src/com/earth2me/essentials/commands/EssentialsLoopCommand.java @@ -116,7 +116,7 @@ public abstract class EssentialsLoopCommand extends EssentialsCommand } else { - final User player = getPlayer(server, searchTerm, skipHidden, false); + final User player = getPlayer(server, searchTerm, !skipHidden, false); updatePlayer(server, sender, player, commandArgs); } } |