Package dev.kotx.flylib.command.arguments

Types

BooleanArgument
Link copied to clipboard
class BooleanArgument<T>(name: String, suggestion: SuggestionAction<T>?, action: ContextAction<T>?) : Argument<Boolean, T>

Boolean argument. It must take true or false. If the input value is neither true nor false (not a valid expression of a boolean), an error will be displayed on the client side, and even if you try to execute it, it will not be accepted. Expected input: truefalseTRUE 'False'

DoubleArgument
Link copied to clipboard
class DoubleArgument<T>(name: String, min: Double, max: Double, suggestion: SuggestionAction<T>?, action: ContextAction<T>?) : Argument<Double, T>

Double precision floating point argument. You can set the minimum and maximum values. If it falls below the minimum value or exceeds the maximum value, an error will be displayed on the client side, and even if you try to execute it, it will not be accepted. Expected input: 26.3-1200.0

EntityArgument
Link copied to clipboard
class EntityArgument<T>(name: String, enableSelector: Boolean, enableEntities: Boolean, suggestion: SuggestionAction<T>?, action: ContextAction<T>?) : Argument<List<Entity>, T>

An argument that takes a player name or entity selector as input. If a player name that does not exist or an invalid selector is entered, an error will be displayed on the client side, and even if you try to execute it, it will not be accepted. Expected input: PlayerName@a, @r, @e[distance=..5]

FloatArgument
Link copied to clipboard
class FloatArgument<T>(name: String, min: Float, max: Float, suggestion: SuggestionAction<T>?, action: ContextAction<T>?) : Argument<Float, T>

Anti-precision floating point argument. You can set the minimum and maximum values. If it falls below the minimum value or exceeds the maximum value, an error will be displayed on the client side, and even if you try to execute it, it will not be accepted. Expected input: 26.3-1200.0

IntegerArgument
Link copied to clipboard
class IntegerArgument<T>(name: String, min: Int, max: Int, suggestion: SuggestionAction<T>?, action: ContextAction<T>?) : Argument<Int, T>

Integer argument. You can set the minimum and maximum values. If it falls below the minimum value or exceeds the maximum value, an error will be displayed on the client side, and even if you try to execute it, it will not be accepted. Expected input: 2-120

LiteralArgument
Link copied to clipboard
class LiteralArgument<T>(name: String, action: ContextAction<T>?) : Argument<String, T>

An argument that does not have any user input. Input other than "name" is not allowed. If anything other than "name" is entered, an error will be displayed on the client side and even if you try to execute it, it will not be accepted. Expected input (if "name" specified "test"): test

LocationArgument
Link copied to clipboard
class LocationArgument<T>(name: String, suggestion: SuggestionAction<T>?, action: ContextAction<T>?) : Argument<Location, T>

An argument that takes coordinates as an input value. You can also use "~" and "^". If it falls below the minimum value or exceeds the maximum value, an error will be displayed on the client side, and even if you try to execute it, it will not be accepted. Expected input : 123 456 789~ ~10 ~111 ~5 ^10

LongArgument
Link copied to clipboard
class LongArgument<T>(name: String, min: Long, max: Long, suggestion: SuggestionAction<T>?, action: ContextAction<T>?) : Argument<Long, T>

Long value argument. You can specify the maximum and minimum values. If you enter it in the wrong coordinate format, an error will be displayed on the client side and even if you try to execute it, it will not be accepted. Expected input: 2-120

StringArgument
Link copied to clipboard
class StringArgument<T>(name: String, type: StringArgument.Type, suggestion: SuggestionAction<T>?, action: ContextAction<T>?) : Argument<String, T>

String argument type. You can specify string type. If it is not the specified type, an error will be displayed on the client side and the attempt to execute will not be accepted. String Type: WORD ->helloworld String Type: PHRASE_QUOTED ->helloworld"This is quoted string" String Type: PHRASE ->hello stringword"Quoted string"

VectorArgument
Link copied to clipboard
class VectorArgument<T>(name: String, suggestion: SuggestionAction<T>?, action: ContextAction<T>?) : Argument<Vector, T>

An argument that takes direction as an input value. You can also use "~" and "^". If it falls below the minimum value or exceeds the maximum value, an error will be displayed on the client side, and even if you try to execute it, it will not be accepted. Expected input : 123 456 789~ ~10 ~111 ~5 ^10