Class UnavailableCommandsEvent
Namespace: Void.Minecraft.Events.Chat
Assembly: Void.Minecraft.dll
Signals that the server command tree could not be decoded and allows listeners to provide a replacement.
public record UnavailableCommandsEvent : IScopedEvent, IEvent, IEquatable<UnavailableCommandsEvent>Inheritance
object ← UnavailableCommandsEvent
Implements
IScopedEvent, IEvent, IEquatable<UnavailableCommandsEvent>
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
UnavailableCommandsEvent(ILink, IPlayer, Exception?)
Signals that the server command tree could not be decoded and allows listeners to provide a replacement.
public UnavailableCommandsEvent(ILink Link, IPlayer Player, Exception? Reason)Parameters
Link ILink
The link on which command-tree decoding failed.
Player IPlayer
The player that would receive the command tree.
Reason Exception?
The decoding failure, or null when no exception was recorded.
Properties
CopyProxyCommandNode
Gets or sets whether proxy commands should be copied into a listener-provided replacement root.
public bool CopyProxyCommandNode { get; set; }Property Value
CustomCommandNode
Gets or sets the replacement command root supplied by listeners.
public RootCommandNode? CustomCommandNode { get; set; }Property Value
Link
The link on which command-tree decoding failed.
public ILink Link { get; init; }Property Value
Player
The player that would receive the command tree.
public IPlayer Player { get; init; }Property Value
Reason
The decoding failure, or null when no exception was recorded.
public Exception? Reason { get; init; }Property Value
Methods
ReplaceCommandNode(bool)
Creates an empty replacement root command node.
public void ReplaceCommandNode(bool copyProxyCommandNode = true)Parameters
copyProxyCommandNode bool
Whether subsequent handling should copy proxy commands into the new root.
ReplaceCommandNode(RootCommandNode, bool)
Selects a replacement command root and configures whether proxy commands are copied into it.
public void ReplaceCommandNode(RootCommandNode commandNode, bool copyProxyCommandNode = true)Parameters
commandNode RootCommandNode
The root command node to use as the replacement.
copyProxyCommandNode bool
Whether subsequent handling should copy proxy commands into commandNode.