UsageBuilder

class UsageBuilder<T>

Builder for creating arguments and definitions.

Constructors

UsageBuilder
Link copied to clipboard
fun UsageBuilder()

Functions

booleanArgument
Link copied to clipboard
fun booleanArgument(name: String, suggestion: SuggestionAction<T>? = null, action: ContextAction<T>? = null): UsageBuilder<T>

An argument that takes a boolean value.

description
Link copied to clipboard
fun description(description: String): UsageBuilder<T>

Description of arguments and definitions.

doubleArgument
Link copied to clipboard
fun doubleArgument(name: String, suggestion: SuggestionAction<T>? = null, action: ContextAction<T>? = null): UsageBuilder<T>

An argument that takes a double value.

fun doubleArgument(name: String, min: Double = Double.MIN_VALUE, max: Double = Double.MAX_VALUE, suggestion: SuggestionAction<T>? = null, action: ContextAction<T>? = null): UsageBuilder<T>

An argument that takes a double value. You can specify the lowest and highest values.

entityArgument
Link copied to clipboard
fun entityArgument(name: String, enableSelector: Boolean = true, enableEntities: Boolean = true, suggestion: SuggestionAction<T>? = null, action: ContextAction<T>? = null): UsageBuilder<T>

An argument that takes an entity as a value.

executes
Link copied to clipboard
fun executes(action: ContextAction<T>): UsageBuilder<T>

What is done.

floatArgument
Link copied to clipboard
fun floatArgument(name: String, suggestion: SuggestionAction<T>? = null, action: ContextAction<T>? = null): UsageBuilder<T>

An argument that takes a float value.

fun floatArgument(name: String, min: Float = Float.MIN_VALUE, max: Float = Float.MAX_VALUE, suggestion: SuggestionAction<T>? = null, action: ContextAction<T>? = null): UsageBuilder<T>

An argument that takes a float value. You can specify the lowest and highest values.

integerArgument
Link copied to clipboard
fun integerArgument(name: String, suggestion: SuggestionAction<T>? = null, action: ContextAction<T>? = null): UsageBuilder<T>

An argument that takes an Int value.

fun integerArgument(name: String, min: Int = Int.MIN_VALUE, max: Int = Int.MAX_VALUE, suggestion: SuggestionAction<T>? = null, action: ContextAction<T>? = null): UsageBuilder<T>

An argument that takes an Int value. The lowest value and the highest value can be specified.

literalArgument
Link copied to clipboard
fun literalArgument(literal: String, action: ContextAction<T>? = null): UsageBuilder<T>

Only the text specified in the literal argument literal is allowed, and the user's own input is not accepted.

locationArgument
Link copied to clipboard
fun locationArgument(name: String, suggestion: SuggestionAction<T>? = null, action: ContextAction<T>? = null): UsageBuilder<T>

An argument that takes a coordinate.

longArgument
Link copied to clipboard
fun longArgument(name: String, suggestion: SuggestionAction<T>? = null, action: ContextAction<T>? = null): UsageBuilder<T>

An argument that takes a long value.

fun longArgument(name: String, min: Long = Long.MIN_VALUE, max: Long = Long.MAX_VALUE, suggestion: SuggestionAction<T>? = null, action: ContextAction<T>? = null): UsageBuilder<T>

An argument that takes a Long value. You can specify the lowest and highest values.

permission
Link copied to clipboard
fun permission(permission: Permission): UsageBuilder<T>

Permission to execute.

selectionArgument
Link copied to clipboard
fun selectionArgument(name: String, vararg selections: String, action: ContextAction<T>? = null): UsageBuilder<T>
fun selectionArgument(name: String, selections: List<String>, action: ContextAction<T>? = null): UsageBuilder<T>

String argument of the selection formula.

stringArgument
Link copied to clipboard
fun stringArgument(name: String, suggestion: SuggestionAction<T>? = null, action: ContextAction<T>? = null): UsageBuilder<T>

An argument that takes a String value.

fun stringArgument(name: String, type: StringArgument.Type = StringArgument.Type.WORD, suggestion: SuggestionAction<T>? = null, action: ContextAction<T>? = null): UsageBuilder<T>

An argument that takes a String value. Type can be specified.

vectorArgument
Link copied to clipboard
fun vectorArgument(name: String, suggestion: SuggestionAction<T>? = null, action: ContextAction<T>? = null): UsageBuilder<T>

Argument that takes a direction.