mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-19 06:58:17 +00:00
[Fix] Fix vanished player matching in: /seen /give /burn /nuke /tpall /tpaall
This commit is contained in:
parent
35783ee429
commit
3bcd3390fe
1 changed files with 8 additions and 3 deletions
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue