Minecraft:Commands/defaultgamemode: Difference between revisions
More actions
Remove broken links to missing pages |
Fix template calls: add MC/ prefix |
||
| Line 1: | Line 1: | ||
{{ | {{MC/Exclusive|java}} | ||
{{Infobox command | {{Infobox command | ||
|name=defaultgamemode | |name=defaultgamemode | ||
| Line 13: | Line 13: | ||
==Arguments== | ==Arguments== | ||
{{ | {{MC/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}} | {{MC/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}} | {{MC/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}} | {{MC/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}} | {{MC/Output table|Otherwise|1|1|0}} | ||
{{Output table}} | {{MC/Output table}} | ||
==Examples== | ==Examples== | ||
| Line 37: | Line 37: | ||
==See also== | ==See also== | ||
:{{ | :{{MC/Cmd|gamemode}} – changes a player's game mode | ||
== History == | == History == | ||
{{HistoryTable | {{HistoryTable | ||
|{{HistoryLine|java}} | |{{MC/HistoryLine|java}} | ||
|{{HistoryLine||1.3.1|dev=12w22a|Added {{ | |{{HistoryLine||1.3.1|dev=12w22a|Added {{MC/Cmd|defaultgamemode|link=none}}.}} | ||
|{{HistoryLine||1.8|dev=14w05a|Added {{ | |{{HistoryLine||1.8|dev=14w05a|Added {{MC/Cd|spectator}} to {{MC/Cmd|defaultgamemode|link=none}}.}} | ||
|{{HistoryLine||1.19.3|dev=22w45a|Now this command accepts a [[Minecraft:Argument types|gamemode argument]], instead of literal subcommands.}} | |{{MC/HistoryLine||1.19.3|dev=22w45a|Now this command accepts a [[Minecraft:Argument types|gamemode argument]], instead of literal subcommands.}} | ||
}} | }} | ||
== Navigation == | == Navigation == | ||
{{Navbox commands}} | {{MC/Navbox commands}} | ||
de:Befehl/defaultgamemode | de:Befehl/defaultgamemode | ||
Latest revision as of 20:09, 9 April 2026
Script error: No such module "Exclusive". Template:Infobox command
Sets the default 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
<gamemode>: gamemode
- Specifies the default game mode.
- Template:Arg desc
Result
Template:Result table Template:Result table Template:Result table Template:Result table
Output
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-table-lines|-2}}{{#vardefine:output-table-lines-now|}}{{#vardefine:command-num-now|}}{{#vardefine:command-line-now|}}{{#vardefine:commands-num|}}{{#vardefine:output-edition-num-now|}}{{#vardefine:output-edition-line-now|}}{{#vardefine:output-editions-num|}}{{#vardefine:je-outputs-dis|}}
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|If in multiplayer, and force-gamemode in the Minecraft:server.properties file is true}}{{#vardefine:output1-{{#var:output-table-lines}}|1}}{{#vardefine:output2-{{#var:output-table-lines}}|1}}{{#vardefine:output3-{{#var:output-table-lines}}|the number of online players whose game mode is changed}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-editions-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-{{#var:output-editions-num}}|je}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|1}}
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|If in LAN world}}{{#vardefine:output1-{{#var:output-table-lines}}|1}}{{#vardefine:output2-{{#var:output-table-lines}}|1}}{{#vardefine:output3-{{#var:output-table-lines}}|the number of online players whose game mode is changed}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-editions-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-{{#var:output-editions-num}}|je}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|1}}
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|Otherwise}}{{#vardefine:output1-{{#var:output-table-lines}}|1}}{{#vardefine:output2-{{#var:output-table-lines}}|1}}{{#vardefine:output3-{{#var:output-table-lines}}|0}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|Expression error: Unrecognized punctuation character "{".}}
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-table-lines|-2}}{{#vardefine:output-table-lines-now|}}{{#vardefine:command-num-now|}}{{#vardefine:command-line-now|}}{{#vardefine:commands-num|}}{{#vardefine:output-edition-num-now|}}{{#vardefine:output-edition-line-now|}}{{#vardefine:output-editions-num|}}{{#vardefine:je-outputs-dis|}}
Examples
- To set the default game mode to survival:
defaultgamemode survival
See also
- REDIRECT Template:Command
Template:Redr – changes a player's game mode
History
de:Befehl/defaultgamemode es:Comandos/defaultgamemode ja:コマンド/defaultgamemode lzh:令/defaultgamemode pt:Comandos/defaultgamemode ru:Команды консоли/defaultgamemode uk:Команди консолі/defaultgamemode zh:命令/defaultgamemode