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
SuccessboolWhether the command was carried out.
MessagestringWhat 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
Success
Whether the command was carried out.
public bool Success { get; init; }
Property Value
Methods
Accepted(string?)
The command was carried out.
public static PluginCommandResult Accepted(string? message = null)
Parameters
messagestringWhat 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
messagestringWhy, in words for the player.
Returns
- PluginCommandResult
A failed result.