world
Bedrock world component.
- class bedrock_server_manager.core.server.world.ServerWorlds(server: BedrockServer)
World operations for one Bedrock server.
- async extract_mcworld(mcworld_file_path: str, target_world_dir_name: str) str
Validate and extract a world archive, returning its installed directory.
Stage the new world before replacing an existing target.
- async export_world(world_dir_name: str, target_mcworld_file_path: str) None
Export a world to the requested
.mcworldpath.Use save hold/query/resume for a running active world. Replace an existing export and clean temporary archive files.
- async import_world(mcworld_backup_file_path: str) str
Replace the active world from a validated archive and return its name.
Extraction failure preserves the existing world.
- async delete_world() bool
Permanently delete the active world; absence also counts as success.
The server normally regenerates that world at its next start.
- async has_world_icon() bool
Return whether the active world has a regular
world_icon.jpegfile.
- property world_icon_filename: str
str: The standard filename for a world’s icon image (
world_icon.jpeg).
- async get_world_icon_filesystem_path() str | None
Optional[str]: The absolute filesystem path to the world icon for the active world.
This is constructed by joining the active world’s directory path (from
_get_active_world_directory_path()) with the standard icon filename (world_icon_filename).Returns
Noneif the active world directory path cannot be determined (e.g., ifget_world_name()fails or is unavailable).