Paper icon indicating copy to clipboard operation
Paper copied to clipboard

Make CommandSourceStack respect hidden players

Open notTamion opened this issue 1 year ago • 11 comments

fixes #11545

notTamion avatar Nov 01 '24 17:11 notTamion

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.

lynxplay avatar Nov 01 '24 17:11 lynxplay

its only called by argument types so i think fixing this that deep is the correct solution. image

notTamion avatar Nov 01 '24 18:11 notTamion

Okay, thanks for the quick check :+1:

lynxplay avatar Nov 01 '24 19:11 lynxplay

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?

lynxplay avatar Nov 10 '24 00:11 lynxplay

Perhaps we can add an exclusion for operators?

notTamion avatar Nov 10 '24 08:11 notTamion

I think excluding operators makes sense.

Leguan16 avatar Nov 10 '24 14:11 Leguan16

just an idea, if anyone has a solution they find better please leave a comment

notTamion avatar Nov 10 '24 21:11 notTamion

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.

Machine-Maker avatar Nov 10 '24 22:11 Machine-Maker

I don't know. The paper command for example also works for ops and mixing op and permission requirements sucks.

Leguan16 avatar Nov 10 '24 22:11 Leguan16

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

notTamion avatar Nov 11 '24 21:11 notTamion

Ok, I think we want a permission, but just for command suggestions, paper.bypass-visibility.tab-completion

Machine-Maker avatar Nov 23 '24 19:11 Machine-Maker