News
Game
Guides
Downloads
Versions
/unpublish
COMMANDS SERVER ADMIN CONSOLE · LEVEL 4 Added in 26.2

/unpublish command in Minecraft

/unpublish closes a world that you opened to other players with /publish or the Open to LAN button. It was added in 26.2 and, like /publish, needs level 4 in a singleplayer world with cheats on.

Syntax

/unpublish

// Only in single player: the command does not exist on a dedicated server.

Examples

Stop sharing the world

/unpublish

Closes the world to new players; you keep playing on your own.

Java 26.3
Build your command

Fill in the fields, then copy the command.

Command generator

How it works

The game answers Multiplayer game is now unpublished and new players can no longer join. Before this command existed, the only way to stop sharing a LAN world was to leave it. If the world was not shared, the message is No multiplayer game published.

To open it again with other settings, for example without cheats for guests, run /publish. To remove a single guest and keep the world open, /kick is enough. Your own game is not interrupted: the world stays open for you.

✓ Checked in Java Edition 26.3 · updated 2 November 2026

/unpublish: FAQ

Does /unpublish close my world?

No. You keep playing in your world; only the sharing with other players stops.

Why does /unpublish say no game is published?

The world was not open to other players. Use /publish or Open to LAN first.

How do I use /unpublish?

Type it in a single-player world with cheats on: /unpublish. It does not exist on a dedicated server.

Who can use /unpublish?

Single player with cheats on, level 4. Only in single player: the command does not exist on a dedicated server.

Since when does /unpublish exist?

It is in the official command tree since Java Edition 26.2.

Related commands