Class DefaultPlayerCommandMessageService
Default implementation of IPlayerCommandMessageService. Sends formatted messages to players via SendClientMessage.
public class DefaultPlayerCommandMessageService : IPlayerCommandMessageService
- Inheritance
-
DefaultPlayerCommandMessageService
- Implements
- Inherited Members
Constructors
DefaultPlayerCommandMessageService(ICommandTextFormatter)
Initializes a new instance of the DefaultPlayerCommandMessageService class with the specified command text formatter.
public DefaultPlayerCommandMessageService(ICommandTextFormatter formatter)
Parameters
formatterICommandTextFormatterA formatter used to format command text.
Methods
SendCommandNotFound(Player, string)
Sends a command not found message to a player.
public virtual bool SendCommandNotFound(Player player, string input)
Parameters
playerPlayerThe player to send the message to.
inputstringThe input text that didn't match any command.
Returns
- bool
True to continue processing, false to stop and return false from the command handler.
SendPermissionDenied(Player, CommandDefinition)
Sends a permission denied message to a player.
public virtual bool SendPermissionDenied(Player player, CommandDefinition overload)
Parameters
playerPlayerThe player to send the message to.
overloadCommandDefinitionThe command overload that was denied.
Returns
- bool
True if a message was send to the player, false otherwise.
SendUsage(Player, IReadOnlyList<CommandDefinition>, string)
Sends a usage message to a player.
public virtual void SendUsage(Player player, IReadOnlyList<CommandDefinition> overloads, string usedCommandName = "")
Parameters
playerPlayerThe player to send the message to.
overloadsIReadOnlyList<CommandDefinition>All overloads of the command.
usedCommandNamestringThe actual command name/path used (e.g., alias name). Empty string means use canonical command name.