squaremap icon indicating copy to clipboard operation
squaremap copied to clipboard

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

Open HydrolienF opened this issue 1 year ago • 4 comments

It would be nice to have a /squaremap show all and /squaremap hide all.

HydrolienF avatar Apr 20 '24 23:04 HydrolienF

The hidden status is stored in the player data, so we can't do anything about offline players. This means hiding and showing all is not a reversible action if the players online changes in between. This would lead to unexpected behavior and so isn't something I want to include. On Fabric & NeoForge you should be able to use /execute to run the command as each online player. On Paper you would need to use the API.

jpenilla avatar Apr 21 '24 22:04 jpenilla

On second thought, I guess this could be a command that just toggles the player tracker at runtime, which could actually be useful

jpenilla avatar Apr 21 '24 22:04 jpenilla

The solution that I will prefer is a config option that have 3 values: forced_show, forced_hide, player_setting. (Could be editable through command tho).

  • player_setting is the current behavior where it use visibility stored on player data.
  • forced_visible will make player visible no mater if they have run /map hide
  • forced_show will make player visible no mater if they have run /map show

If you agree with that new feature, I can try to do it and send a pull request.

HydrolienF avatar Apr 24 '24 09:04 HydrolienF