Builder

A builder for building banner metadata.

Functions

Link copied to clipboard
@Contract(value = "_ -> this", mutates = "this")
abstract fun addAttributeModifier(modifier: ItemAttributeModifier): BannerMeta.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): BannerMeta.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): BannerMeta.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): BannerMeta.Builder

Sets the given hide flag on the item.

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

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

Link copied to clipboard
@Contract(value = "_ -> this", mutates = "this")
abstract fun addPattern(pattern: BannerPattern): BannerMeta.Builder

Adds the given pattern to the list of patterns for the banner metadata.

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

Builds the resulting item metadata.

Link copied to clipboard
@Contract(value = "_ -> this", mutates = "this")
open fun canDestroy(vararg blocks: Block): BannerMeta.Builder
@Contract(value = "_ -> this", mutates = "this")
abstract fun canDestroy(blocks: Collection<Block>): BannerMeta.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): BannerMeta.Builder
@Contract(value = "_ -> this", mutates = "this")
abstract fun canPlaceOn(blocks: Collection<Block>): BannerMeta.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 customModelData(data: Int): BannerMeta.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): BannerMeta.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): BannerMeta.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): BannerMeta.Builder
@Contract(value = "_ -> this", mutates = "this")
abstract fun lore(lore: Collection<Component>): BannerMeta.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?): BannerMeta.Builder

Sets the name of the item to the given name.

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

Sets the patterns of the banner metadata.

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

Makes the item unbreakable.

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

Sets whether the item is unbreakable to the given value.