SuspendingCommandElement

abstract class SuspendingCommandElement(pluginContainer: <Error class: unknown class>, text: <Error class: unknown class>)

Constructors

Link copied to clipboard
constructor(pluginContainer: <Error class: unknown class>, text: <Error class: unknown class>)

Functions

Link copied to clipboard
abstract suspend fun complete(    src: <Error class: unknown class>,     args: <Error class: unknown class>,     context: <Error class: unknown class>): List<String?>?

Fetch completions for command arguments.

Link copied to clipboard
open fun getKey(): <Error class: unknown class>?

Return the key to be used for this object.

Link copied to clipboard

Return the plain key, to be used when looking up this command element in a CommandContext. If the key is a TranslatableText, this is the translation's id. Otherwise, this is the result of Text.toPlain.

Link copied to clipboard
open fun getUsage(src: <Error class: unknown class>): <Error class: unknown class>?

Return a usage message for this specific argument.

Link copied to clipboard
open fun parse(source: <Error class: unknown class>, args: <Error class: unknown class>, context: <Error class: unknown class>)

Attempt to extract a value for this element from the given arguments and put it in the given context. This method normally delegates to .parseValue for getting the values. This method is expected to have no side-effects for the source, meaning that executing it will not change the state of the CommandSource in any way.

Link copied to clipboard
fun toCommandElement(): <Error class: unknown class>

Converts this SuspendingCommandElement to a Sponge-Api compatible CommandElement.