Package-level declarations

Types

Link copied to clipboard
class CommandCreator<T : ArgumentBuilder<CommandSourceStack, T>>(val plugin: Plugin?, 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(), description: String? = null, alias: Collection<String> = emptyList(), 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<*>

Registers a custom argument type to the DSL.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getAngle(name: String): Float
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>.getAxes(name: String): AxisSet

Retrieves an AxisSet from the command context.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getBlockInWorldPredicate(name: String): BlockInWorldPredicate

Retrieves a BlockInWorldPredicate from the command context.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getBlockState(name: String): BlockState

Retrieves a BlockState from the command context.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getColumnBlockPosition(name: String): ColumnBlockPosition
Link copied to clipboard
fun CommandContext<CommandSourceStack>.getColumnFinePosition(name: String): ColumnFinePosition

Retrieves a ColumnFinePosition from the command context.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getComponent(name: String): Component

Retrieves a Component from the command context.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getDoubleRange(name: String): DoubleRangeProvider

Retrieves a DoubleRangeProvider from the command context.

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>.getEntityAnchor(name: String): LookAnchor

Retrieves a LookAnchor (entity anchor) 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>.getGameMode(name: String): GameMode

Retrieves a GameMode from the command context.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getHeightMap(name: String): HeightMap

Retrieves a HeightMap from the command context.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getHexColor(name: String): TextColor

Retrieves a TextColor (hex color) from the command context.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getIntegerRange(name: String): IntegerRangeProvider

Retrieves an IntegerRangeProvider from the command context.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getItemStack(name: String): ItemStack

Retrieves an ItemStack from the command context.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getItemStackPredicate(name: String): ItemStackPredicate

Retrieves an ItemStackPredicate from the command context.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getKey(name: String): Key

Retrieves a Key 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>.getNamedColor(name: String): NamedTextColor

Retrieves a NamedTextColor from the command context.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getNamespacedKey(name: String): NamespacedKey

Retrieves a NamespacedKey from the command context.

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

Retrieves an Objective from the command context.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getObjectiveCriteria(name: String): Criteria

Retrieves a Criteria (objective criteria) 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>.getPlayerProfiles(name: String): Collection<PlayerProfile>
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>.getRotation(name: String): Rotation
Link copied to clipboard
fun CommandContext<CommandSourceStack>.getScoreboardDisplaySlot(name: String): DisplaySlot

Retrieves a DisplaySlot from the command context.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getSlot(name: String): Int

Retrieves a slot index (Int) from the command context.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getSlots(name: String): SlotRange

Retrieves a SlotRange from the command context.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getStyle(name: String): Style

Retrieves a Style from the command context.

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

Retrieves a Team from the command context.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getTemplateMirror(name: String): Mirror

Retrieves a Mirror (template mirror) from the command context.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getTemplateRotation(name: String): StructureRotation

Retrieves a StructureRotation (template rotation) from the command context.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getTime(name: String): Int

Retrieves a time value in ticks (Int) from the command context.

Link copied to clipboard
fun CommandContext<CommandSourceStack>.getUuid(name: String): UUID

Retrieves a UUID from the command context.

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

Retrieves a World from the command context.