context
Typed callback views with immutable notification data and scoped cancellation.
- bedrock_server_manager.events.context.freeze(value: Any) Any
Freeze JSON containers without sharing mutable event payloads.
- class bedrock_server_manager.events.context.EventPayload(**extra_data: Any)
Default typed view; callers can supply a specific Pydantic payload model.
- model_config = {'extra': 'allow', 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class bedrock_server_manager.events.context.EventNotification(context: bedrock_server_manager.events.models.EventContext, data: Mapping[str, Any], operation: bedrock_server_manager.events.operations.OperationSnapshot | None, sequence: bedrock_server_manager.events.operations.OperationSequence | None, arguments: tuple[Any, ...])
- class bedrock_server_manager.events.context.PluginEvent(context: ~bedrock_server_manager.events.models.EventContext, data: ~typing.Mapping[str, ~typing.Any], operation: ~bedrock_server_manager.events.operations.OperationSnapshot | None, sequence: ~bedrock_server_manager.events.operations.OperationSequence | None, arguments: tuple[~typing.Any, ...], payload: ~bedrock_server_manager.events.context.T, _deadline: float, _can_cancel: ~typing.Callable[[], bool], _cancel: ~typing.Callable[[str], None], _cancelled: ~typing.Callable[[], tuple[bool, str | None]], _clock: ~typing.Callable[[], float] = <built-in function monotonic>, _is_active: ~typing.Callable[[], bool] = <function PluginEvent.<lambda>>)
Typed payloads are detached copies; data is recursively immutable.
- cancel(reason: str = 'Cancelled by plugin') None
Cancel only during this live before-hook; observers cannot veto work.