How to display gamemode in Minecraft multiplayer server?

Is there any possible ways to display every players game mode on screen such as setdisplay function/command? This would be used so that server OP's did not cheat to get resources that they want.


Solution 1:

Create a dummy variable: /scoreboard objectives add gamemode dummy

In a repeating command block, set their score to 1 if they're in creative: /scoreboard players set @a[gamemode=creative] gamemode 1 (You'll need to /forceload the chunk the repeating command block is in.)

And add it to the sidebar: /scoreboard objectives setdisplay sidebar gamemode

This will show in the sidebar whether someone has entered creative mode, even if they swap back to survival mode afterwards. To reset it, do /scoreboard players set PLAYERNAME gamemode 0, replacing PLAYERNAME with the name of the player.