Package net.axay.kspigot.commands

Types

BrigardierSupport
Link copied to clipboard
object BrigardierSupport
This class provides Brigardier support.

Functions

argument
Link copied to clipboard
inline fun <T> ArgumentBuilder<CommandListenerWrapper, *>.argument(name: String, type: ArgumentType<T>, builder: RequiredArgumentBuilder<CommandListenerWrapper, T>.() -> Unit)
Add an argument.
command
Link copied to clipboard
inline fun command(name: String, register: Boolean = true, builder: LiteralArgumentBuilder<CommandListenerWrapper>.() -> Unit): LiteralArgumentBuilder<CommandListenerWrapper>
Create a new command.
getArgument
Link copied to clipboard
inline fun <T> CommandContext<CommandListenerWrapper>.getArgument(name: String): T
Get the value of this argument.
literal
Link copied to clipboard
inline fun ArgumentBuilder<CommandListenerWrapper, *>.literal(name: String, builder: LiteralArgumentBuilder<CommandListenerWrapper>.() -> Unit)
Add a new literal to this command.
simpleExecutes
Link copied to clipboard
inline fun <S> ArgumentBuilder<S, *>.simpleExecutes(crossinline executor: (CommandContext<S>) -> Unit)
Add custom execution logic for this command.
simpleSuggests
Link copied to clipboard
fun <S> RequiredArgumentBuilder<S, *>.simpleSuggests(suggestionBuilder: suspend (CommandContext<S>) -> Iterable<Any?>?)
Add custom suspending suggestion logic for an argument.

Properties

bukkitWorld
Link copied to clipboard
val CommandListenerWrapper.bukkitWorld: World
Returns the Bukkit world instance.
player
Link copied to clipboard
val CommandListenerWrapper.player: Player
Returns the player who executed the command, or fails the command if it wasn't executed by a player.