Class LongArgumentType
Namespace: Void.Minecraft.Commands.Brigadier.ArgumentTypes
Assembly: Void.Minecraft.dll
Constrains a numeric token to an inclusive 64-bit range.
public record LongArgumentType : IArgumentType, IAnyArgumentType, IEquatable<LongArgumentType>Inheritance
Implements
IArgumentType, IAnyArgumentType, IEquatable<LongArgumentType>
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Remarks
The current parser consumes the token through
Properties
Examples
Gets representative valid input strings.
public IEnumerable<string> Examples { get; }Property Value
Maximum
Gets the inclusive maximum.
public required long Maximum { get; init; }Property Value
Minimum
Gets the inclusive minimum.
public required long Minimum { get; init; }Property Value
Methods
GetLong(CommandContext, string)
Gets a parsed long argument from a context.
public static long GetLong(CommandContext context, string name)Parameters
context CommandContext
The command context.
name string
The argument name.
Returns
The parsed long integer.
LongArgument()
Creates an argument configured with the complete 64-bit range.
public static LongArgumentType LongArgument()Returns
The argument type.
LongArgument(long)
Creates an argument with a minimum and
public static LongArgumentType LongArgument(long min)Parameters
min long
The inclusive minimum.
Returns
The argument type.
LongArgument(long, long)
Creates an argument with explicit inclusive bounds.
public static LongArgumentType LongArgument(long min, long max)Parameters
min long
The inclusive minimum.
max long
The inclusive maximum.
Returns
The argument type. The bounds are retained without validation.
Parse(StringReader)
Parses a value from the reader’s current cursor.
public IArgumentValue Parse(StringReader reader)Parameters
reader StringReader
The command reader to consume.
Returns
The parsed argument value.