Package-level declarations
Public DSL for defining and accessing command arguments in Paper commands.
This package contains extension functions for io.github.kraftlin.command.paper.PaperLiteralNode to add various argument types, for example:
io.github.kraftlin.command.paper.arguments.entity and io.github.kraftlin.command.paper.arguments.player for selectors.
io.github.kraftlin.command.paper.arguments.blockPosition and io.github.kraftlin.command.paper.arguments.finePosition for coordinates.
io.github.kraftlin.command.paper.arguments.rotation and io.github.kraftlin.command.paper.arguments.angle for orientation.
io.github.kraftlin.command.paper.arguments.component and io.github.kraftlin.command.paper.arguments.signedMessage for Adventure chat types.
io.github.kraftlin.command.paper.arguments.choice and io.github.kraftlin.command.paper.arguments.enum for custom string-based selections.
io.github.kraftlin.command.paper.arguments.playerProfiles and io.github.kraftlin.command.paper.arguments.uuid for identity.
Each builder has a matching accessor on io.github.kraftlin.command.paper.PaperContext to retrieve the parsed values.
Refer to the paper arguments documentation for a detailed description of available argument types and usage examples.
Functions
Returns the resolved angle in degrees. @see PaperLiteralNode.angle
Adds an angle argument (single float rotation). @see PaperContext.angle
Returns the parsed AxisSet. @see PaperLiteralNode.axes
Adds an AxisSet argument (combination of x, y, z axes). @see PaperContext.axes
Returns the parsed BlockInWorldPredicate. @see PaperLiteralNode.blockInWorldPredicate
Adds a BlockInWorldPredicate argument for testing blocks in the world. @see PaperContext.blockInWorldPredicate
Returns the resolved BlockPosition. @see PaperLiteralNode.blockPosition
Adds a block position (x, y, z integers) argument. @see PaperContext.blockPosition
Returns the parsed BlockState. @see PaperLiteralNode.blockState
Adds a BlockState argument. @see PaperContext.blockState
Returns the parsed value of a choice argument.
Adds a string "choice" argument to this command.
Returns the resolved ColumnBlockPosition. @see PaperLiteralNode.columnBlockPosition
Adds a column block position (x, z integers) argument. @see PaperContext.columnBlockPosition
Returns the resolved ColumnFinePosition. @see PaperLiteralNode.columnFinePosition
Adds a column fine position (x, z doubles) argument. @see PaperContext.columnFinePosition
Adds a column fine position argument. When centerIntegers is true, integer inputs are centered (+0.5). @see PaperContext.columnFinePosition
Retrieves the value of a Component argument from the command context.
Adds a formatted chat Component argument to this command.
Returns the parsed double Range. @see PaperLiteralNode.doubleRange
Adds a double range argument (e.g. 0.5..1.0). @see PaperContext.doubleRange
Returns all entities matched by the entity selector (can be empty).
Adds a selector argument that may resolve to zero or more entities.
Returns exactly one selected entity. Safe to use with PaperLiteralNode.entity.
Adds an entity selector argument that must resolve to exactly one entity.
Returns the parsed LookAnchor. @see PaperLiteralNode.entityAnchor
Adds a LookAnchor (eyes or feet) argument. @see PaperContext.entityAnchor
Returns the resolved FinePosition. @see PaperLiteralNode.finePosition
Adds a fine position (x, y, z doubles) argument. @see PaperContext.finePosition
Adds a fine position argument. When centerIntegers is true, integer inputs are centered (+0.5). @see PaperContext.finePosition
Returns the parsed GameMode. @see PaperLiteralNode.gameMode
Adds a GameMode argument. @see PaperContext.gameMode
Returns the parsed HeightMap. @see PaperLiteralNode.heightMap
Adds a HeightMap argument. @see PaperContext.heightMap
Returns the parsed hex TextColor. @see PaperLiteralNode.hexColor
Adds a hex TextColor argument. @see PaperContext.hexColor
Returns the parsed integer Range. @see PaperLiteralNode.integerRange
Adds an integer range argument (e.g. 1..5). @see PaperContext.integerRange
Returns the parsed ItemStackPredicate. @see PaperLiteralNode.itemPredicate
Adds an ItemStackPredicate argument for testing item stacks. @see PaperContext.itemPredicate
Returns the parsed ItemStack. @see PaperLiteralNode.itemStack
Adds an ItemStack argument. @see PaperContext.itemStack
Returns the parsed Key. @see PaperLiteralNode.key
Adds an Adventure Key argument. @see PaperContext.key
Returns the parsed NamedTextColor. @see PaperLiteralNode.namedColor
Adds a NamedTextColor argument. @see PaperContext.namedColor
Returns the parsed NamespacedKey. @see PaperLiteralNode.namespacedKey
Adds a NamespacedKey argument. @see PaperContext.namespacedKey
Returns the parsed Criteria. @see PaperLiteralNode.objectiveCriteria
Adds a scoreboard objective Criteria argument. @see PaperContext.objectiveCriteria
Returns exactly one selected player. Safe to use with PaperLiteralNode.player.
Adds an entity selector argument that must resolve to exactly one entity.
Returns the resolved collection of PlayerProfiles. @see PaperLiteralNode.playerProfiles
Adds a player profile list argument. @see PaperContext.playerProfiles
Returns all players matched by the player selector (can be empty).
Adds a selector argument that may resolve to zero or more players.
Returns the resolved registry entry of type T. @see PaperLiteralNode.resource
Adds a registry resource argument that resolves to the actual registry entry of type T. @see PaperContext.resource
Returns the parsed TypedKey for a resource.
Adds a registry resource key argument that resolves to a TypedKey without loading the entry. @see PaperContext.resourceKey
Returns the resolved Rotation. @see PaperLiteralNode.rotation
Adds a Rotation (yaw, pitch) argument. @see PaperContext.rotation
Returns the parsed DisplaySlot. @see PaperLiteralNode.scoreboardDisplaySlot
Adds a scoreboard DisplaySlot argument. @see PaperContext.scoreboardDisplaySlot
Returns the parsed SignedMessage, preserving signatures if provided by the client.
Adds a SignedMessage argument. This preserves signatures from the client, if supported. This argument type is useful for commands that accept chat components from players - such as chat or broadcast commands.
Retrieves the value of a Style argument from the command context.
Adds a Style argument to this command, which can be applied using Component.style.
Returns the parsed Mirror. @see PaperLiteralNode.templateMirror
Adds a structure Mirror argument. @see PaperContext.templateMirror
Returns the parsed StructureRotation. @see PaperLiteralNode.templateRotation
Adds a StructureRotation argument. @see PaperContext.templateRotation
Returns the parsed time value in ticks. @see PaperLiteralNode.time
Adds a time argument (in ticks). @see PaperContext.time
Adds a time argument (in ticks) with minimum minTime. @see PaperContext.time
Returns the parsed UUID. @see PaperLiteralNode.uuid
Adds a UUID argument. @see PaperContext.uuid
Returns the parsed World. @see PaperLiteralNode.world
Adds a World argument. @see PaperContext.world