Table of Contents

Interface IPlayerCommandService

Namespace
SampSharp.Entities.SAMP.Commands
Assembly
SampSharp.OpenMp.Entities.Commands.dll

Dispatches chat input from a player to a method marked with PlayerCommandAttribute.

public interface IPlayerCommandService

Properties

Registry

Gets the command registry containing all registered player commands.

ICommandRegistry Registry { get; }

Property Value

ICommandRegistry

Methods

Invoke(IServiceProvider, EntityId, string)

Invokes a player command from the given chat input.

bool Invoke(IServiceProvider services, EntityId player, string inputText)

Parameters

services IServiceProvider

Service provider used to resolve handler systems and DI parameters.

player EntityId

The invoking player.

inputText string

Raw chat input including the leading slash.

Returns

bool

true if a handler claimed the input; otherwise false.