mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-18 12:31:26 +02:00
[Fix] Fix vanished player matching in: /seen /give /burn /nuke /tpall /tpaall
This commit is contained in:
@@ -50,6 +50,11 @@ public abstract class EssentialsCommand implements IEssentialsCommand
|
|||||||
|
|
||||||
protected User getPlayer(final Server server, final CommandSender sender, final String[] args, final int pos) throws NoSuchFieldException, NotEnoughArgumentsException
|
protected User getPlayer(final Server server, final CommandSender sender, final String[] args, final int pos) throws NoSuchFieldException, NotEnoughArgumentsException
|
||||||
{
|
{
|
||||||
|
if (sender instanceof Player)
|
||||||
|
{
|
||||||
|
User user = ess.getUser(sender);
|
||||||
|
return getPlayer(server, user, args, pos);
|
||||||
|
}
|
||||||
return getPlayer(server, null, args, pos, true, false);
|
return getPlayer(server, null, args, pos, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,7 +80,7 @@ public abstract class EssentialsCommand implements IEssentialsCommand
|
|||||||
{
|
{
|
||||||
throw new PlayerNotFoundException();
|
throw new PlayerNotFoundException();
|
||||||
}
|
}
|
||||||
if (!getHidden && user.isHidden() || user.equals(sourceUser))
|
if (!getHidden && user.isHidden() && !user.equals(sourceUser))
|
||||||
{
|
{
|
||||||
throw new PlayerNotFoundException();
|
throw new PlayerNotFoundException();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user