外观
player_abilities API
模块说明
text
Native inbound ability evidence and explicit, unretried permission requests.PlayerAbilityReference
python
class PlayerAbilityReference(TypedDict)字段(包含继承字段):
PlayerAbilityReference.connection_id
python
connection_id: str必填;声明于 player_abilities.PlayerAbilityReference。
PlayerAbilityReference.unique_id
python
unique_id: str必填;声明于 player_abilities.PlayerAbilityReference。
PlayerAbilityReference.uuid
python
uuid: str必填;声明于 player_abilities.PlayerAbilityReference。
PlayerAbilityReference.revision
python
revision: int必填;声明于 player_abilities.PlayerAbilityReference。
PlayerAbilities
python
class PlayerAbilitiesSDK 说明:
text
Prepare only, with caller-owned idempotency keys and fixed deadlines.
Observation reads cached inbound UpdateAbilities. Request does not update
that cache or wait for a fabricated acknowledgement. Execute the returned
intent through Operations; retain unknown outcomes and never retry them
automatically. A later observation is independent evidence.PlayerAbilities.__init__
python
def __init__(self, operations: Operations)PlayerAbilities.observe
python
def observe(
self,
unique_id: str,
*,
idempotency_key: str,
deadline: str,
connection_id: str = '',
max_age_ms: int = 500,
) -> OperationIntentSDK 说明:
text
Read one unique ID, optionally pinned to a connection; no refresh IO.PlayerAbilities.request
python
def request(
self,
ref: PlayerAbilityReference,
*,
permission_level: int,
requested_permissions: int,
idempotency_key: str,
deadline: str,
) -> OperationIntentSDK 说明:
text
Request level 0..3 and the supported low eight permission bits.
The Host rechecks grants and current target revision before dispatch.
Only a real inbound observation supplies ref; player names are not refs.
Successful dispatch does not prove that permissions changed.PlayerAbilities.operations
python
self.operations公开实例属性,在 __init__ 中设置。