From Minecraft Wiki
Opens single-player world to the local network.
- Opens your single-player game for LAN friends to join. This command appears in the singleplayer cheats.
- Success Conditions
- Cannot be used in a command block.
- Cannot be used on a multiplayer server, and will fail if the world is already published to LAN.