mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-04 19:46:27 +00:00
[Permission] essentials.vanish.interact - Players with this permission will be able to interact with hidden players.
This commit is contained in:
parent
896e14670f
commit
889157371c
12 changed files with 40 additions and 29 deletions
|
@ -41,12 +41,13 @@ public class Commandext extends EssentialsCommand
|
|||
|
||||
private void extinguishPlayers(final Server server, final CommandSender sender, final String name) throws Exception
|
||||
{
|
||||
boolean skipHidden = sender instanceof Player && !ess.getUser(sender).isAuthorized("essentials.vanish.interact");
|
||||
boolean foundUser = false;
|
||||
final List<Player> matchedPlayers = server.matchPlayer(name);
|
||||
for (Player matchPlayer : matchedPlayers)
|
||||
{
|
||||
final User player = ess.getUser(matchPlayer);
|
||||
if (player.isHidden())
|
||||
if (skipHidden && player.isHidden())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue