Class CommandHandler
Represents a single command handler
Inherited Members
Namespace: Slipe.Server.IO
Assembly: SlipeServer.dll
Syntax
public class CommandHandler
Constructors
| Improve this Doc View SourceCommandHandler(String, Action<Player, String, String[]>, Boolean, Boolean)
Adds a command handler to be used by players
Declaration
public CommandHandler(string command, Action<Player, string, string[]> callback, bool restricted = false, bool caseSensitive = true)
Parameters
Type | Name | Description |
---|---|---|
String | command | |
Action<Player, String, String[]> | callback | |
Boolean | restricted | |
Boolean | caseSensitive |
CommandHandler(String, Action<String, String[]>, Boolean, Boolean)
Adds a command handler to be used by the console
Declaration
public CommandHandler(string command, Action<string, string[]> consoleCallback, bool restricted = false, bool caseSensitive = true)
Parameters
Type | Name | Description |
---|---|---|
String | command | |
Action<String, String[]> | consoleCallback | |
Boolean | restricted | |
Boolean | caseSensitive |
Methods
| Improve this Doc View SourceExecute(Player, String, String[])
Executes the command handler in name of the player
Declaration
public static void Execute(Player player, string command, string[] args)
Parameters
Type | Name | Description |
---|---|---|
Player | player | |
String | command | |
String[] | args |
Execute(Player, String[])
Executes the command handler in name of the player
Declaration
public void Execute(Player player, string[] args)
Parameters
Type | Name | Description |
---|---|---|
Player | player | |
String[] | args |