Class AsyncPlayerCommandBase
Asynchronous command requiring the invoking Player's current World.
public abstract class AsyncPlayerCommandBase : AsyncCommandBase, IAsyncCommand, ICommand
- Inheritance
-
AsyncPlayerCommandBase
- Implements
- Inherited Members
Remarks
Execution begins only after the exact Player world binding is validated. Implementations receive no Flecs handles and must open a fresh synchronous borrow for each ECS operation after an await. The method body starts on the World thread, so work before its first incomplete await must remain short.
Constructors
AsyncPlayerCommandBase(string, string, params string[])
Asynchronous command requiring the invoking Player's current World.
protected AsyncPlayerCommandBase(string name, string description, params string[] aliases)
Parameters
Remarks
Execution begins only after the exact Player world binding is validated. Implementations receive no Flecs handles and must open a fresh synchronous borrow for each ECS operation after an await. The method body starts on the World thread, so work before its first incomplete await must remain short.
Methods
ExecuteAsync(CommandContext, Player, World, CancellationToken)
protected abstract ValueTask ExecuteAsync(CommandContext context, Player player, World world, CancellationToken cancellationToken)
Parameters
contextCommandContextplayerPlayerworldWorldcancellationTokenCancellationToken
Returns
ExecuteAsync(CommandContext, CancellationToken)
public override sealed ValueTask ExecuteAsync(CommandContext context, CancellationToken cancellationToken)
Parameters
contextCommandContextcancellationTokenCancellationToken