Minecraft:Commands/defaultgamemode: Difference between revisions
More actions
Fix template calls: add MC/ prefix |
Sync: updated from Minecraft |
||
| Line 1: | Line 1: | ||
{{ | {{exclusive|java}} | ||
{{Infobox command | {{Infobox command | ||
|name=defaultgamemode | |name=defaultgamemode | ||
| Line 5: | Line 5: | ||
}} | }} | ||
Sets the default game mode (Creative, Survival, etc.) for new players entering a [[Minecraft:multiplayer]] [[Minecraft:server]]. If in multiplayer and <code>force-gamemode</code> in the [[Minecraft:server.properties]] file is true, or if in LAN world, all online players are set to this game mode. | Sets the default [[Minecraft:game mode]] (Creative, Survival, etc.) for new players entering a [[Minecraft:multiplayer]] [[Minecraft:server]]. If in multiplayer and <code>force-gamemode</code> in the [[Minecraft:server.properties]] file is true, or if in LAN world, all online players are set to this game mode. | ||
==Syntax== | ==Syntax== | ||
| Line 13: | Line 13: | ||
==Arguments== | ==Arguments== | ||
{{ | {{argument|gamemode|gamemode}} | ||
: Specifies the default game mode. | : Specifies the default game mode. | ||
:{{arg_desc|je=gamemode}} | :{{arg_desc|je=gamemode}} | ||
| Line 25: | Line 25: | ||
== Output == | == Output == | ||
{{ | {{Output table}} | ||
{{ | {{Output table|edition=je|If in multiplayer, and <code>force-gamemode</code> in the [[Minecraft:server.properties]] file is true|1|1|the number of online players whose game mode is changed}} | ||
{{ | {{Output table|edition=je|If in LAN world|1|1|the number of online players whose game mode is changed}} | ||
{{ | {{Output table|Otherwise|1|1|0}} | ||
{{ | {{Output table}} | ||
==Examples== | ==Examples== | ||
| Line 37: | Line 37: | ||
==See also== | ==See also== | ||
:{{ | :{{cmd|gamemode}} – changes a player's game mode | ||
== History == | == History == | ||
{{HistoryTable | {{HistoryTable | ||
|{{ | |{{HistoryLine|java}} | ||
|{{HistoryLine||1.3.1|dev=12w22a|Added {{ | |{{HistoryLine||1.3.1|dev=12w22a|Added {{cmd|defaultgamemode|link=none}}.}} | ||
|{{HistoryLine||1.8|dev=14w05a|Added {{ | |{{HistoryLine||1.8|dev=14w05a|Added {{cd|spectator}} to {{cmd|defaultgamemode|link=none}}.}} | ||
|{{ | |{{HistoryLine||1.19.3|dev=22w45a|Now this command accepts a [[Minecraft:Argument types|gamemode argument]], instead of literal subcommands.}} | ||
}} | }} | ||
== Navigation == | == Navigation == | ||
{{ | {{Navbox commands}} | ||
de:Befehl/defaultgamemode | [[Minecraft:de:Befehl/defaultgamemode]] | ||
es:Comandos/defaultgamemode | [[Minecraft:es:Comandos/defaultgamemode]] | ||
ja:コマンド/defaultgamemode | [[Minecraft:fr:Commandes/defaultgamemode]] | ||
lzh:令/defaultgamemode | [[Minecraft:ja:コマンド/defaultgamemode]] | ||
pt:Comandos/defaultgamemode | [[Minecraft:lzh:令/defaultgamemode]] | ||
ru:Команды консоли/defaultgamemode | [[Minecraft:pt:Comandos/defaultgamemode]] | ||
uk:Команди консолі/defaultgamemode | [[Minecraft:ru:Команды консоли/defaultgamemode]] | ||
zh:命令/defaultgamemode | [[Minecraft:uk:Команди консолі/defaultgamemode]] | ||
[[Minecraft:zh:命令/defaultgamemode]] | |||
Latest revision as of 11:05, 3 July 2026
Template:Exclusive Template:Infobox command
Sets the default Minecraft:game mode (Creative, Survival, etc.) for new players entering a Minecraft:multiplayer Minecraft:server. If in multiplayer and force-gamemode in the Minecraft:server.properties file is true, or if in LAN world, all online players are set to this game mode.
Syntax
defaultgamemode <gamemode>
Arguments
- Specifies the default game mode.
- Template:Arg desc
Result
Template:Result table Template:Result table Template:Result table Template:Result table
Output
Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table
Examples
- To set the default game mode to survival:
defaultgamemode survival
See also
- Template:Cmd – changes a player's game mode
History
Minecraft:de:Befehl/defaultgamemode Minecraft:es:Comandos/defaultgamemode Minecraft:fr:Commandes/defaultgamemode Minecraft:ja:コマンド/defaultgamemode Minecraft:lzh:令/defaultgamemode Minecraft:pt:Comandos/defaultgamemode Minecraft:ru:Команды консоли/defaultgamemode Minecraft:uk:Команди консолі/defaultgamemode Minecraft:zh:命令/defaultgamemode