Publish Your World with the Publish Command
The /publish command in Minecraft Java Edition lets a level 4 operator publish a world and decide if commands are allowed.
Players use this command to quickly set command permissions using a true or false value and optionally choose a specific port number between 0 and 65535.
/publish/publish <allowCommands> [<port>]/publish/publish <allowCommands> [<port>]| Argument | Type | What it means |
|---|---|---|
<allowCommands> | true / false | A true or false value that decides whether commands are permitted. |
<port> | whole number 0 to 65535 | An optional whole number from 0 to 65535 that sets the network port. |
/publishPublishes the world right away without entering any extra settings.
/publish truePublishes the world with commands enabled and lets the game assign the port automatically.
/publish falsePublishes the world with commands turned off and no custom port specified.
/publish true 25565Publishes the world with commands enabled on port 25565.
/publish false 50000Publishes the world with commands disabled on custom port 50000.
/publish true 0Publishes the world with commands enabled while setting the port argument to 0.
/publish false 65535Publishes the world with commands disabled using the highest possible port number of 65535.
Measured from the game files of every Java release from 1.13 to 26.3.
+ /publish <allowCommands> [<port>]− /publish <allowCommands>− /publish <allowCommands> <gamemode> [<port>]+ /publish+ /publish <allowCommands>+ /publish <allowCommands> <gamemode> [<port>]− /publish [<port>]Minecraft Bedrock Edition does not have a command named /publish, as this command is only available in Java Edition.
You must have permission level 4 (Server owner) to run the /publish command.
The <port> argument accepts any whole number from 0 to 65535.
Yes, before 1.19.3 the syntax was /publish [<port>], in 1.19.3 it added <allowCommands> and <gamemode>, and in 26.3 the gamemode argument was removed to leave /publish <allowCommands> [<port>].
/ban/ban-ip/banlist/datapack/deop/fetchprofile/kick/list/op/pardon/pardon-ip/reload/save-all/save-off/save-on/setidletimeout