Skip to content

Add a global player visibility that can override player choice.#520

Open
HydrolienF wants to merge 1 commit intojpenilla:masterfrom
HydrolienF:show-or-hide-all-players
Open

Add a global player visibility that can override player choice.#520
HydrolienF wants to merge 1 commit intojpenilla:masterfrom
HydrolienF:show-or-hide-all-players

Conversation

@HydrolienF
Copy link

It's done with map.player-visibility in the config and it can be set to "FORCED_HIDDEN", "FORCED_SHOWN", "PLAYER_SETTING". Player can still do /map hide or /map show, but if the player visibility is set to FORCED_HIDDEN, no player will be visible or if it is set to FORCED_SHOWN, all player will be visible. It does not make spectator or NPC visible, it only affect player that would be visible if /map show was executed.

It will close #209
I've tried to fit to the coding style of the project & to place the new enum at the most logic location. Let me know if you would prefer any changes.

I will switch from draft to pull request once I will have done more tests.

I can also add this new config param to the config wiki page.

It's map.player-visibility and it can be set to "FORCED_HIDDEN", "FORCED_SHOWN", "PLAYER_SETTING".
Player can still do `/map hide` or `/map show`, but if the player visibility is set to FORCED_HIDDEN, no player will be visible or if it is set to FORCED_SHOWN, all player will be visible.
It does not make spectator or NPC visible, it only affect player that would be visible if `/map show` was executed.
@HydrolienF HydrolienF marked this pull request as ready for review February 17, 2026 19:19
@HydrolienF
Copy link
Author

I've tested it. It does hide all players with FORCED_HIDDEN, it does show all players with FORCED_SHOWN and switching back to PLAYER_SETTING use the player setting again.

@HydrolienF
Copy link
Author

Let me know if you would like to see any changes to this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a function to hide or show all players at the same times

1 participant