SlotRange

interface SlotRange

Represents a range of inventory slots, identified by a serialized name and a list of slot indices.

This is used as the result type for slots arguments in commands.

Example usage in a command:

slots("range") {
executes { context ->
val range = context.getArgument("range", SlotRange::class.java)
println("Slots: ${range.slots}, Name: ${range.serializedName}")
1
}
}

Inheritors

Properties

Link copied to clipboard
abstract val serializedName: String

The serialized string name of this slot range (e.g. "hotbar.0").

Link copied to clipboard
abstract val slots: IntList

The list of slot indices included in this range.