Builder

A builder for building crossbow metadata.

Functions

Link copied to clipboard
@Contract(value = "_ -> this", mutates = "this")
abstract fun addAttributeModifier(modifier: ItemAttributeModifier): CrossbowMeta.Builder

Adds the given modifier modifier to the list of attribute modifiers for the item.

Link copied to clipboard
@Contract(value = "_ -> this", mutates = "this")
abstract fun addCanDestroy(block: Block): CrossbowMeta.Builder

Adds the given block to the list of blocks the item can destroy.

Link copied to clipboard
@Contract(value = "_ -> this", mutates = "this")
abstract fun addCanPlaceOn(block: Block): CrossbowMeta.Builder

Adds the given block to the list of blocks the item can be placed on.

Link copied to clipboard
@Contract(value = "_ -> this", mutates = "this")
abstract fun addFlag(flag: ItemFlag): CrossbowMeta.Builder

Sets the given hide flag on the item.

Link copied to clipboard
@Contract(value = "_ -> this", mutates = "this")
abstract fun addLore(lore: Component): CrossbowMeta.Builder

Adds the given lore line to the lore of the item.

Link copied to clipboard
@Contract(value = "_ -> this", mutates = "this")
open fun attributeModifiers(vararg modifiers: ItemAttributeModifier): CrossbowMeta.Builder
@Contract(value = "_ -> this", mutates = "this")
abstract fun attributeModifiers(modifiers: Collection<ItemAttributeModifier>): CrossbowMeta.Builder

Sets the list of attribute modifiers applied to entities wearing items that the metadata is applied to to the given modifiers.

Link copied to clipboard
@Contract(value = "-> new", pure = true)
abstract fun build(): CrossbowMeta

Builds the resulting item metadata.

Link copied to clipboard
@Contract(value = "_ -> this", mutates = "this")
open fun canDestroy(vararg blocks: Block): CrossbowMeta.Builder
@Contract(value = "_ -> this", mutates = "this")
abstract fun canDestroy(blocks: Collection<Block>): CrossbowMeta.Builder

Sets the list of blocks the item can destroy to the given blocks.

Link copied to clipboard
@Contract(value = "_ -> this", mutates = "this")
open fun canPlaceOn(vararg blocks: Block): CrossbowMeta.Builder
@Contract(value = "_ -> this", mutates = "this")
abstract fun canPlaceOn(blocks: Collection<Block>): CrossbowMeta.Builder

Sets the list of blocks the item can be placed on to the given blocks.

Link copied to clipboard
@Contract(value = "_ -> this", mutates = "this")
abstract fun charged(value: Boolean): CrossbowMeta.Builder

Sets whether the crossbow is charged to the given value.

Link copied to clipboard
@Contract(value = "_ -> this", mutates = "this")
abstract fun customModelData(data: Int): CrossbowMeta.Builder

Sets the custom model data for the item to the given data.

Link copied to clipboard
@Contract(value = "_ -> this", mutates = "this")
abstract fun damage(damage: Int): CrossbowMeta.Builder

Sets the damage of the item to the given damage.

Link copied to clipboard
@Contract(value = "_ -> this", mutates = "this")
abstract fun hideFlags(flags: Int): CrossbowMeta.Builder

Sets the hide flags for the item to the given flags.

Link copied to clipboard
@Contract(value = "_ -> this", mutates = "this")
open fun lore(vararg lore: Component): CrossbowMeta.Builder
@Contract(value = "_ -> this", mutates = "this")
abstract fun lore(lore: Collection<Component>): CrossbowMeta.Builder

Sets the lore of the item to the given lore.

Link copied to clipboard
@Contract(value = "_ -> this", mutates = "this")
abstract fun name(name: Component?): CrossbowMeta.Builder

Sets the name of the item to the given name.

Link copied to clipboard
@Contract(value = "_ -> this", mutates = "this")
open fun projectiles(vararg projectiles: ItemStack): CrossbowMeta.Builder
@Contract(value = "_ -> this", mutates = "this")
abstract fun projectiles(projectiles: Collection<ItemStack>): CrossbowMeta.Builder

Sets the list of charged projectiles for the crossbow to the given projectiles.

Link copied to clipboard
@Contract(value = "-> this", mutates = "this")
open fun unbreakable(): CrossbowMeta.Builder

Makes the item unbreakable.

@Contract(value = "_ -> this", mutates = "this")
abstract fun unbreakable(value: Boolean): CrossbowMeta.Builder

Sets whether the item is unbreakable to the given value.