CommandBuilder

A builder for Minecraft commands.

This is used to build up a list of commands that can be executed in a function.

Types

Link copied to clipboard
interface Storable
Link copied to clipboard

Functions

Link copied to clipboard

fun align(_align: String, c: CommandBuilder.() -> Unit)

Creates one or more execute commands aligned in to the given axes

Link copied to clipboard

fun anchored(_anchor: EntityAnchor, c: CommandBuilder.() -> Unit)

Creates one or more execute commands anchored to the entity anchor

Link copied to clipboard
fun as_(_as: String, c: CommandBuilder.() -> Unit)

fun as_(_as: EntityArg, c: CommandBuilder.() -> Unit)

Creates one or more execute commands running as the given entity

Link copied to clipboard
fun at(_at: String, c: CommandBuilder.() -> Unit)

fun at(_at: EntityArg, c: CommandBuilder.() -> Unit)

Creates one or more execute commands running at the position of given entity

Link copied to clipboard
fun cmd(cmd: String)

Creates a new command

fun cmd(cmds: List<String>)

Creates multiple commands

Link copied to clipboard

Adds a subcommand to an execute command, allows nesting with other execute commands.

fun executeSubcommand(subcommand: String, c: CommandBuilder.() -> Unit)
Link copied to clipboard

fun facing(_pos: Coord, c: CommandBuilder.() -> Unit)

Creates one or more execute commands facing a given position

Link copied to clipboard

Creates one or more execute commands following the given condition

Link copied to clipboard

fun in_(_in: String, c: CommandBuilder.() -> Unit)

Creates one or more execute commands running in the given dimension

Link copied to clipboard

fun on(_rel: RelationArg, c: CommandBuilder.() -> Unit)

Creates one or more execute commands on a relation to the given entity

Link copied to clipboard

fun positioned(_pos: Coord, c: CommandBuilder.() -> Unit)

Creates one or more execute commands positioned at a given position

Link copied to clipboard
fun positionedAs(_pos: String, c: CommandBuilder.() -> Unit)

Creates one or more execute commands positioned as a given entity

Link copied to clipboard

Creates one or more execute commands positioned over a heightmap

Link copied to clipboard

fun rotated(_pos: Rotation, c: CommandBuilder.() -> Unit)

Creates one or more execute commands rotated at a given rotation

Link copied to clipboard
fun rotatedAs(_pos: String, c: CommandBuilder.() -> Unit)

fun rotatedAs(_pos: EntityArg, c: CommandBuilder.() -> Unit)

Creates one or more execute commands rotated as a given entity

Link copied to clipboard
fun schedule(time: String, f: Func): Func

Schedules a function to be run at a specific time

fun schedule(time: String, c: CommandBuilder.() -> Unit): Func

Schedules commands to be run at a specific time

Link copied to clipboard
fun store(resultSuccess: CommandBuilder.StoreKind = StoreKind.RESULT, dest: CommandBuilder.Storable): CommandBuilder
fun store(resultSuccess: CommandBuilder.StoreKind = StoreKind.RESULT, dest: String): CommandBuilder
fun store(resultSuccess: CommandBuilder.StoreKind = StoreKind.RESULT, dest: CommandBuilder.Storable, c: CommandBuilder.() -> Unit)

fun store(resultSuccess: CommandBuilder.StoreKind = StoreKind.RESULT, dest: String, c: CommandBuilder.() -> Unit)

Creates one or more execute commands storing the result or success of a command in a storage location

Link copied to clipboard

fun summon(_entity: String, c: CommandBuilder.() -> Unit)

Creates one or more execute commands summoning an entity and executing a command as that entity