Package-level declarations

Types

Link copied to clipboard
class CommandCreator<T : ArgumentBuilder<CommandSourceStack, T>>(var builder: T)

Creates and manages Minecraft commands using a DSL-style builder pattern.

Link copied to clipboard
annotation class CommandDsl

Marker annotation for Command DSL.

Link copied to clipboard

Handles error messages for command execution.

Functions

Link copied to clipboard
inline fun Plugin.command(name: String = this.name.lowercase(), block: CommandCreator<LiteralArgumentBuilder<CommandSourceStack>>.() -> Unit)

Creates and registers a new command for the Plugin.

Link copied to clipboard
fun <V> CommandCreator<*>.custom(name: String, type: ArgumentType<V>, creator: CommandCreator<RequiredArgumentBuilder<CommandSourceStack, V>>.() -> Unit = {}): CommandCreator<out ArgumentBuilder<CommandSourceStack, *>>

Registers a custom argument type to the DSL.

Link copied to clipboard
inline fun <T> CommandContext<CommandSourceStack>.getArg(name: String): T

Extension functions for CommandContext to retrieve arguments easily.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getEntities(name: String): List<Entity>

Retrieves a list of Entitys from the command context.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getEntity(name: String): Entity?

Retrieves a Entity from the command context.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getFineLocation(name: String): Location

Retrieves a Location (Fine Position) from the command context.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getLocation(name: String): Location

Retrieves a Location (Block Position) from the command context.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getPlayer(name: String): Player?

Retrieves a Player from the command context.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getPlayers(name: String): List<Player>

Retrieves a list of Players from the command context.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getWorld(name: String): World

Retrieves a World from the command context.