mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-06 02:51:32 +01:00
Make looping commands see vanished players properly
Make /r check player existence in the correct order
This commit is contained in:
parent
e25e02d154
commit
97d176ea27
@ -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())
|
||||
{
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user