The Gamepedia and Fandom account systems have now been merged. If your username is incorrect, you have accounts on both platforms that weren't merged, or you have trouble signing in, please submit a support ticket.

Commands/publish

From Minecraft Wiki
Jump to: navigation, search
Information icon.svg
This feature is exclusive to Java Edition.
publish
Restrictions

Operator
No command blocks

First introduced

Java Edition 1.3.1 (12w24a)

Opens singleplayer world to the local network.

Syntax[edit]

publish [<port>]

Arguments[edit]

<port>

The port to host on, between 0 and 65535. If not specified, a random port above 1024 is chosen.

Result[edit]

This command appears in the singleplayer cheats. Cannot be used on a multiplayer server.

Fails if the world is already published to LAN, or if the port could not be bound (e.g. a reserved port, or already in use by another application).

On success, opens your singleplayer game for LAN friends to join.

History[edit]

Java Edition
1.3.112w24aAdded /publish.
1.1317w45a/publish now accepts an optional port argument.