Class ConsoleCommand
A custom console command.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Jotunn.Entities
Assembly: Jotunn.dll
Syntax
public abstract class ConsoleCommand : CustomEntity
Properties
| Improve this Doc View SourceHelp
The help text that will be displayed to the user for your command when they type `help` into their console.
Declaration
public abstract string Help { get; }
Property Value
Type | Description |
---|---|
System.String |
IsCheat
If true, this command will only work after `devcommands` is run in the console.
Declaration
public virtual bool IsCheat { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsNetwork
If true, this command will be allowed in networked play.
Declaration
public virtual bool IsNetwork { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsSecret
If true, this command will not be shown when the user types `help` into their console.
Declaration
public virtual bool IsSecret { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Name
The command that the user will need to type in their console to run your command.
Declaration
public abstract string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
OnlyServer
If true, and IsNetwork is true, this command will be allowed in networked play, but only for the server.
Declaration
public virtual bool OnlyServer { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceCommandOptionList()
Override this function to return a list of strings that are valid options for your command
Declaration
public virtual List<string> CommandOptionList()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.String> | List of valid command options |
Run(String[])
The function that will be called when the user runs your console command, with space-delimited arguments.
Declaration
public abstract void Run(string[] args)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | args | The arguments the user types, with spaces being the delimiter. |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
System.Object.ToString()