Properties API Documentation

bedrock_server_manager.api.properties.get_properties(server_name: str, app_context: AppContext) Dict[str, Any]

Retrieves the current server properties for a given server.

Parameters:
  • server_name (str) – The name of the server.

  • app_context (AppContext) – The application context.

Returns:

A dictionary containing the parsed server properties.

Return type:

Dict[str, Any]

bedrock_server_manager.api.properties.validate_property_value(property_name: str, value: str) Dict[str, str]

Validates a specific server property value before it gets applied.

Parameters:
  • property_name (str) – The name of the property to validate.

  • value (str) – The proposed value for the property.

Returns:

A dictionary indicating success or validation error message.

Return type:

Dict[str, str]

bedrock_server_manager.api.properties.set_properties(server_name: str, properties_to_update: Dict[str, str], app_context: AppContext, restart_after_modify: bool = False) Dict[str, str]

Sets one or multiple server properties for a given server.

Parameters:
  • server_name (str) – The name of the server.

  • properties_to_update (Dict[str, str]) – A dictionary of property keys and new values.

  • app_context (AppContext) – The application context.

  • restart_after_modify (bool, optional) – Whether to restart the server if running. Defaults to False.

Returns:

A dictionary with the status and result message.

Return type:

Dict[str, str]