Protocol: InventoryLease
Recoverable ownership of one player's temporary inventory replacement.
class InventoryLease(Protocol)
Related API: InventoryLeaseState, InventoryLeaseUnloadPolicy, InventorySnapshot
Properties
id
@property
def id(self) -> str:
Stable lease identifier.
player_id
@property
def player_id(self) -> str:
UUID of the player whose inventory is leased.
unload_policy
@property
def unload_policy(self) -> InventoryLeaseUnloadPolicy:
Requested unload behaviour.
Related API: InventoryLeaseUnloadPolicy
state
@property
def state(self) -> InventoryLeaseState:
Current lease lifecycle state.
Related API: InventoryLeaseState
is_active
@property
def is_active(self) -> bool:
Whether the temporary loadout is currently active.
snapshot
@property
def snapshot(self) -> InventorySnapshot:
Original state that will be restored.
Related API: InventorySnapshot
Methods
restore
def restore(self) -> None:
Restore the original state and close the lease.
discard
def discard(self) -> None:
Keep the current loadout and close the lease without restoration.