Commands such as coop, trust or invite can expose vanished players.
None.
Players "hidden" by vanish plugins should not be exposed through the commands. They should be deemed "offline" by the plugin.
The same should go for tab-completion (and it has already been reported and fixed a while ago on ASB).
As far as I know, we can check if the player's vanished by using Player#canSee().
Plugins (2):
BentoBox, ProtocolVanish
Running SPIGOT 1.14.4.
BentoBox version: 1.8.0
Database: JSON
[...]
Loaded Addons:
BSkyBlock 1.6.0 (ENABLED)
None.
getOnlinePlayerList in the Util class already filters out hidden players so tabComplete should not show them unless you are Op or Console.
For the other items, I think it'd be a good idea to look into a universal "get target player" method in CompositeCommand that will filter out unknown and invisible players appropriately. It's used a lot in the commands.
For the other items, I think it'd be a good idea to look into a universal "get target player" method in CompositeCommand that will filter out unknown and invisible players appropriately. It's used a lot in the commands.
Agreed.
Another command which exposes those in Vanish is /is team trust
It will provide the player a list of admins which are online if they trust every admin.
https://github.com/BentoBoxWorld/BentoBox/pull/1499
Created PR to support making vanished players appearing offline
(Note this PR should only be considered as a temporary fix for users & to be replaced at a later date with a more in-depth system.
EDIT: This has since been adjusted to use the correct methods & will need approval for merge
@tastybento I'm not sure if this issue should be closed.
It seems to me that the Pull Request from @Paul19988 fixes the "/island team" command as it was exposing vanished players, but it doesn't fix commands mentioned in this issue (like trust/coop/invite).
@piotrskibapl Good point. Let's review:
/is team is protected by this PR.Are there any other ways left that the vanished player can leak out?
@tastybento after some testing I found only one command that can expose vanished players now - "/is expel" (via tab completions, assuming that the vanished player is on your island). Might it be caused by changes from #1509 ?
@piotrskibapl Thanks. It should be fixed in the latest build. I also added some other limits to the expel tab-complete so it won't show Ops and mods/admins with expel prevention permissions.
I tested this on build #1860 and it works fine, thanks. I didn't find any other possibilities to expose vanished players - in my opinion the issue could be closed now.