Show / Hide Table of Contents

Class ConsoleCommand

A custom console command.
Inheritance
System.Object
CustomEntity
ConsoleCommand
Inherited Members
CustomEntity.SourceMod
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 Source

Help

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
| Improve this Doc View Source

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
| Improve this Doc View Source

IsNetwork

If true, this command will be allowed in networked play.
Declaration
public virtual bool IsNetwork { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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 Source

CommandOptionList()

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
| Improve this Doc View Source

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.
| Improve this Doc View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()

Extension Methods

PrefabExtension.FixReferences(Object)
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾