Skip to main content

CommandAttribute

Registers a method as /name, !name, and dw_name with typed parameter binding.

public sealed class CommandAttribute : Attribute

Namespace: DeadworksManaged.Api
Inherits / implements: Attribute
Source: Commands/CommandAttribute.cs#L5

Constructors​

new CommandAttribute()​

Signature

public CommandAttribute(string name, params string[] aliases)

Source: Commands/CommandAttribute.cs#L25

Properties​

CommandAttribute.Names​

Signature

public string[] Names { get; }

Source: Commands/CommandAttribute.cs#L7

CommandAttribute.Description​

Signature

public string Description { get; set; } = "";

Source: Commands/CommandAttribute.cs#L8

CommandAttribute.ServerOnly​

Refuses execution from any player caller.

Signature

public bool ServerOnly { get; set; }

Source: Commands/CommandAttribute.cs#L11

CommandAttribute.ChatOnly​

Skip the dw_name console command.

Signature

public bool ChatOnly { get; set; }

Source: Commands/CommandAttribute.cs#L14

CommandAttribute.ConsoleOnly​

Skip the /name and !name chat commands.

Signature

public bool ConsoleOnly { get; set; }

Source: Commands/CommandAttribute.cs#L17

CommandAttribute.SuppressChat​

Force the !name invocation to be hidden from chat broadcast.

Signature

public bool SuppressChat { get; set; }

Source: Commands/CommandAttribute.cs#L20

CommandAttribute.Hidden​

Exclude from the dw_help listing.

Signature

public bool Hidden { get; set; }

Source: Commands/CommandAttribute.cs#L23