Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Commands/publish: Difference between revisions

From SAS Gaming Wiki
imported>ElGrenier
Merged the 2 "1.13"
 
SyncBot (talk | contribs)
Fix template calls: add MC/ prefix
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{exclusive|java}}
{{MC/Exclusive|java}}
{{Infobox command
{{Infobox command
|name=publish
|name=publish
Line 6: Line 6:
}}
}}


Opens [[Minecraft:singleplayer]] [[Minecraft:world]] to the local network.
Opens singleplayer world to the local network.


==Syntax==
==Syntax==
Line 13: Line 13:
==Arguments==
==Arguments==


{{argument|allowCommands|bool}}
{{MC/Argument|allowCommands|bool}}
: Whether [[Minecraft:commands]] are allowed when the world is hosted on the local network. Defaults to false.
: Whether [[Minecraft:commands]] are allowed when the world is hosted on the local network. Defaults to false.
: {{arg_desc|je=bool}}
: {{arg_desc|je=bool}}


{{argument|gamemode|gamemode}}
{{MC/Argument|gamemode|gamemode}}
: Sets the default [[Minecraft:game mode]] for new player. If not specified, the default game mode for new player is the game mode of this world.
: Sets the default game mode for new player. If not specified, the default game mode for new player is the game mode of this world.
: {{arg_desc|je=gamemode}}
: {{arg_desc|je=gamemode}}


{{argument|port|integer}}
{{MC/Argument|port|integer}}
: The [[Minecraft:wikipedia:port (computer networking)|port]] to host on. If not specified, the port is automatically allocated, typically from an ephemeral port range.
: The port to host on. If not specified, the port is automatically allocated, typically from an ephemeral port range.
: {{arg desc|je=integer|min=0|max=65535}}
: {{MC/Arg desc|je=integer|min=0|max=65535}}


==Result==
==Result==
Line 34: Line 34:


== Output ==
== Output ==
{{Output table}}
{{MC/Output table}}
{{Output table|edition=je|On fail|N/A|0|0}}
{{MC/Output table|edition=je|On fail|N/A|0|0}}
{{Output table|On success|N/A|1|the port allocated for this LAN world.}}
{{MC/Output table|On success|N/A|1|the port allocated for this LAN world.}}
{{Output table}}
{{MC/Output table}}


== History ==
== History ==
{{HistoryTable
{{HistoryTable
|{{HistoryLine|java}}
|{{MC/HistoryLine|java}}
|{{HistoryLine||1.3.1|dev=12w24a|Added {{cmd|publish|link=none}}.}}
|{{HistoryLine||1.3.1|dev=12w24a|Added {{MC/Cmd|publish|link=none}}.}}
|{{HistoryLine||1.13|dev=17w45a|{{cmd|link=none|publish}} now accepts an optional {{cd|port}} argument.
|{{HistoryLine||1.13|dev=17w45a|{{MC/Cmd|link=none|publish}} now accepts an optional {{MC/Cd|port}} argument.
|{{cmd|link=none|publish}} can now be run from [[Minecraft:command block]]s.}}
|{{MC/Cmd|link=none|publish}} can now be run from command blocks.}}
|{{HistoryLine|||dev=18w01a|{{cmd|link=none|publish}} can no longer be run from command blocks.}}
|{{HistoryLine|||dev=18w01a|{{MC/Cmd|link=none|publish}} can no longer be run from command blocks.}}
|{{HistoryLine||1.19.3|dev=22w45a|The syntax of {{cmd|link=none|publish}} has been changed, and now accepts optional command and gamemode arguments.}}
|{{HistoryLine||1.19.3|dev=22w45a|The syntax of {{MC/Cmd|link=none|publish}} has been changed, and now accepts optional command and gamemode arguments.}}
}}
}}


== Navigation ==
== Navigation ==
{{Navbox commands}}
{{MC/Navbox commands}}


[[Minecraft:de:Befehl/publish]]
de:Befehl/publish
[[Minecraft:es:Comandos/publish]]
es:Comandos/publish
[[Minecraft:ja:コマンド/publish]]
ja:コマンド/publish
[[Minecraft:lzh:令/publish]]
lzh:令/publish
[[Minecraft:pt:Comandos/publish]]
pt:Comandos/publish
[[Minecraft:ru:Команды консоли/publish]]
ru:Команды консоли/publish
[[Minecraft:zh:命令/publish]]
zh:命令/publish

Latest revision as of 20:12, 9 April 2026

Script error: No such module "Exclusive". Template:Infobox command

Opens singleplayer world to the local network.

Syntax

publish [<allowCommands>] [<gamemode>] [<port>]

Arguments

<allowCommands>: bool

Whether Minecraft:commands are allowed when the world is hosted on the local network. Defaults to false.
Template:Arg desc

<gamemode>: gamemode

Sets the default game mode for new player. If not specified, the default game mode for new player is the game mode of this world.
Template:Arg desc

<port>: integer

The port to host on. If not specified, the port is automatically allocated, typically from an ephemeral port range.
{{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|integer}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}

Result

Template:Result table Template:Result table 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}}|On fail}}{{#vardefine:output1-{{#var:output-table-lines}}|N/A}}{{#vardefine:output2-{{#var:output-table-lines}}|0}}{{#vardefine:output3-{{#var:output-table-lines}}|0}}{{#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}}|On success}}{{#vardefine:output1-{{#var:output-table-lines}}|N/A}}{{#vardefine:output2-{{#var:output-table-lines}}|1}}{{#vardefine:output3-{{#var:output-table-lines}}|the port allocated for this LAN world.}}{{#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|}}

History

Template:HistoryTable

Navigation

All editions
Removed
Template:El only
Debug
Removed
Template:Els only
Template:El only
Removed
Template:El only
Removed
Template:Els only
Removed
Joke
Related

de:Befehl/publish es:Comandos/publish ja:コマンド/publish lzh:令/publish pt:Comandos/publish ru:Команды консоли/publish zh:命令/publish