1

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.

2
  • 2
    This isn't a bad question, but keep in mind if you suspect someone or unsure if they might cheat they probably shouldn't be OPPed – Penguin Nov 9 '20 at 22:12
  • there is a situation, most of my friends is kinda new to this game, i can remove that person from being OP but i just don't want to be mean as a friend. i understand, sometimes its okay to use cheat but it becomes wrong when it being overused for personal purpose. it becomes contradict with the purpose of playing survival mode :/ – Raptr Nov 12 '20 at 0:09
3

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.

5
  • 1
    It's obviously not foolproof, as the OP can just set their own scoreboard variable to 0, but if an OP is determined to cheat you can't really stop it without plugins. – Corsaka Nov 9 '20 at 12:21
  • I'll add up to this a bit: you can create a team by /team add <teamName> and add a color to it with /team modify <teamName> color <teamColor>. Now you can join the team: /team join <teamName> <playerName>. Now you can display the scoreboard only for members of that team, so the 'cheaters' won't suspect anything. Setting the scoreboard for team members only can be done with /scoreboard setdisplay sidebar.team.<teamColor> <yourObjective>. Hope this makes sense and I also hope the syntax isn't wrong, I haven't done commands in some of the newer versions yet. – Quijibo Nov 9 '20 at 17:22
  • im looking forward to do as what you suggest ! i'll update soon :D – Raptr Nov 12 '20 at 0:06
  • " (You'll need to /forceload the chunk the repeating command block is in.)" actually, since spawn chunks are always loaded you can simply use them – Topcode Dec 28 '20 at 7:07
  • @Topcode Yes. They are forceloaded. – Corsaka Jan 2 at 16:16
0

There is a very simple way of doing it with a plugin. Make sure you are running Spigot and download the PAPI plugin. Then move it to your plugins folder and restart/start your server.

Once the plugin is loaded, type /papi ecloud download Player. Then reload using /papi reload and use the placeholder %player_gamemode% anywhere you want.

1
  • do you mean PlaceholderAPI? sounds cool, i'll give it a try soon ! – Raptr Nov 17 '20 at 10:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.