jpenilla / squaremap

squaremap is a minimalistic and lightweight world map viewer for Minecraft servers, using the vanilla map rendering style
https://modrinth.com/plugin/squaremap
Other
331 stars 39 forks source link

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

Open HydrolienF opened 5 months ago

HydrolienF commented 5 months ago

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

jpenilla commented 5 months ago

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 commented 5 months ago

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

HydrolienF commented 5 months ago

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).

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