I have searched and researched. I do not need to know how to set gamemode.
I would need to display (or list) the gamemode of each player in the game from the command line.
Is that possible? If yes, how?
Arqade is a question and answer site for passionate videogamers on all platforms. It only takes a minute to sign up.
Sign up to join this communityI have searched and researched. I do not need to know how to set gamemode.
I would need to display (or list) the gamemode of each player in the game from the command line.
Is that possible? If yes, how?
I have a scoreboard set up to do this:
Base scoreboard command:
/scoreboard objectives add GM dummy Player_Gamemode
Then you set up a redstone clock. This will repeat as often as possible:
(IN COMMAND BLOCKS)
/scoreboard players set @a[m=0] GM 0
/scoreboard players set @a[m=1] GM 1
/scoreboard players set @a[m=2] GM 2
/scoreboard players set @a[m=3] GM 3
Finally, do:
/scoreboard objectives setdisplay sidebar GM
It is possible by using the /say
command in this way:
/say @a Status: @a[m=0] is/are in survival mode
/say @a Status: @a[m=1] is/are in Creative mode
m=M
is the gamemode entity selector argument. Instead of M put 0 for Survival, 1 for Creative, 2 for Adventure and 3 for Spectator mode.
Note: I have not tested this, so my syntax could be wrong. Please fix me if it is wrong.
/say
does not take a player argument, so the first @a
is just going to display the names of all players. The syntax is just /say <message>
– Skylinerw
May 26 '16 at 20:54