Make CommandSourceStack respect hidden players
fixes #11545
We have this diff already https://github.com/PaperMC/Paper/blob/85c870e9c7c97ff9f698dc1137586ee4cd54dda7/patches/server/0988-Fix-entity-type-tags-suggestions-in-selectors.patch#L80-L92
Either we remove this or duplicate it. Idk what else calls this method and if that is of interest to maybe not solve as deep.
its only called by argument types so i think fixing this that deep is the correct solution.
Okay, thanks for the quick check :+1:
While this works, we should probably at least discuss if we want certain commands to obey this visibility. Banning and deop both sounds like commands where I'd never like this command to not show me the members?
Perhaps we can add an exclusion for operators?
I think excluding operators makes sense.
just an idea, if anyone has a solution they find better please leave a comment
I don't like making more functionality dependant on ops. The concept of "op" is not a good thing to really encourage more. People should be using proper permissions. I thought about maybe a new permission that could be granted to bypass all visibility hiding, but I'm not sure about that either.
I don't know. The paper command for example also works for ops and mixing op and permission requirements sucks.
i agree with machine, considering servers will most likely not give staff operator but instead give them the permissions they need i think it would be smarter to add a permission for this. i don't think comparing this to the paper command is fair as the paper command is more of a debug command rather than something a staff member would actually have to use frequently
Ok, I think we want a permission, but just for command suggestions, paper.bypass-visibility.tab-completion