mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-06-30 11:01:40 +00:00
Update essentials to support 3rd party vanish toggling.
This commit is contained in:
parent
0f6625aea9
commit
6269ce9a3f
14 changed files with 122 additions and 46 deletions
|
@ -21,12 +21,14 @@ public class Commandlist extends EssentialsCommand
|
|||
public void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
|
||||
{
|
||||
boolean showHidden = true;
|
||||
User user = null;
|
||||
if (sender.isPlayer())
|
||||
{
|
||||
showHidden = ess.getUser(sender.getPlayer()).isAuthorized("essentials.list.hidden") || ess.getUser(sender.getPlayer()).isAuthorized("essentials.vanish.interact");
|
||||
user = ess.getUser(sender.getPlayer());
|
||||
showHidden = user.isAuthorized("essentials.list.hidden") || user.canInteractVanished();
|
||||
}
|
||||
sender.sendMessage(PlayerList.listSummary(ess, showHidden));
|
||||
final Map<String, List<User>> playerList = PlayerList.getPlayerLists(ess, showHidden);
|
||||
sender.sendMessage(PlayerList.listSummary(ess, user, showHidden));
|
||||
final Map<String, List<User>> playerList = PlayerList.getPlayerLists(ess, user, showHidden);
|
||||
|
||||
if (args.length > 0)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue