how to change someone else’s gamemode in minecraft?

Gamemode. To change the gamemode of a player, you would use the command /gamemode [creative/survival/spectator] [playername] . Simply enter which gamemode you would like, then enter the player name of whoever’s gamemode you wish to change.

Minecraft multiplayer tutorial : how to change gamemodes, teleport, spawn things and much more

Minecraft multiplayer tutorial : how to change gamemodes, teleport, spawn things and much more

Gamemode. To change the gamemode of a player, you would use the command /gamemode [creative/survival/spectator] [playername] . Simply enter which gamemode you would like, then enter the player name of whoever’s gamemode you wish to change.

2 Answers 2 Sorted by:

Selectors (you should probably use @a for this) can have “Selector arguments“. The ones youre interested in for selecting a specific area are:

  • x, y, z – the coordinates for the starting point of the selection, useless without at least one of the three below:
  • r – the max radius that a player can be from the starting point (like a sphere)
  • rm – the min radius that a player can be from the starting point (so targets anyone outside the sphere)
  • dx, dy, dz – the max x, y, and z that a player can be from the starting point (like a cuboid)
  • Using a radius is the easiest method. If the build is at 20, 64, -10 for example, you could change your commands to:

    Which sets the gamemode of anyone within 15 blocks of that point to creative.

    With the cuboid selectors, your starting point should be the corner of the cuboid with the lowest coordinates on all axis (so lowest north-western).

    dx, dy, dz should then be the positive width, height, and length of the cuboid, as such:

    These are more complicated than a radius selector, which you might want to stick with, but will allow you a more accurate area if your build area is cuboid.

    Two more selector arguments you should use for this, along with the area selection, are m and name.

  • m stands for gamemode, which means you can set layers to survival only if their in creative, and vice versa, to avoid repeatedly changing the gamemode of someone already in the gamemode you want them in
  • name will allow you to “exclude the owner of the building”
  • Your final command should look something like:

    Which changes the gamemode to creative for anyone within 15 blocks of 20, 64, -10, if theyre not already in creative, and if their name is not “LyadLaphir” (the !s mean “not”).

    This isnt as complex or as fine as the other most popular answer, but I hope it will do.

    You can place a powered repeating command block underneath a persons home, and simply use

    If you want to exclude a certain person or team, use @a[team=!xxx] or @a[name=!xxx], because an exclamation point before the selector means “not”.

    Leave a Comment