Table of Contents

Struct PluginCommandResult

Namespace
AcDream.Plugin.Abstractions
Assembly
AcDream.Plugin.Abstractions.dll

Result returned by a typed command definition.

public readonly record struct PluginCommandResult : IEquatable<PluginCommandResult>
Implements
Inherited Members

Constructors

PluginCommandResult(bool, string?)

Result returned by a typed command definition.

public PluginCommandResult(bool Success, string? Message = null)

Parameters

Success bool

Whether the command was carried out.

Message string

What to tell the player, or null for nothing.

Properties

Message

What to tell the player, or null for nothing.

public string? Message { get; init; }

Property Value

string

Success

Whether the command was carried out.

public bool Success { get; init; }

Property Value

bool

Methods

Accepted(string?)

The command was carried out.

public static PluginCommandResult Accepted(string? message = null)

Parameters

message string

What to tell the player, or null for nothing.

Returns

PluginCommandResult

A successful result.

Rejected(string)

The command was refused.

public static PluginCommandResult Rejected(string message)

Parameters

message string

Why, in words for the player.

Returns

PluginCommandResult

A failed result.