WrittenBookMeta

Item metadata for books that have been written.

Types

Link copied to clipboard

A builder for building written book metadata.

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun author(): Component
open override fun author(author: Component): WrittenBookMeta
Link copied to clipboard
@NotNull
open fun examinableName(): @NotNull String
Link copied to clipboard
@NotNull
open fun examinableProperties(): @NotNull Stream<out ExaminableProperty>
Link copied to clipboard
@NotNull
open fun <R : Any> examine(@NotNull examiner: @NotNull Examiner<R>): @NotNull R
Link copied to clipboard
abstract fun hasFlag(flag: ItemFlag): Boolean

Checks whether the item has the given item flag.

Link copied to clipboard
@Contract(value = "_ -> new", pure = true)
@NotNull
open fun pages(@NotNull vararg pages: @NotNull Component): @NotNull Book
open override fun pages(): List<Component>
open override fun pages(pages: List<Component>): WrittenBookMeta
Link copied to clipboard
open override fun title(): Component
open override fun title(title: Component): WrittenBookMeta
Link copied to clipboard
abstract override fun toBuilder(): WrittenBookMeta.Builder

Converts this object to a builder with all of the properties of this object set by default.

Link copied to clipboard
@Contract(value = "_ -> new", pure = true)
open fun with(builder: Consumer<WrittenBookMeta.Builder>): WrittenBookMeta

Creates new item metadata from the result of applying the given builder.

@Contract(value = "_ -> new", pure = true)
open fun with(builder: WrittenBookMeta.Builder.() -> Unit): WrittenBookMeta

Creates new item metadata from the result of applying the given builder.

Link copied to clipboard

Creates new item metadata with the given modifier added to the list of modifiers for this item.

Link copied to clipboard

Creates new item metadata with the given attribute modifiers.

Link copied to clipboard
@Contract(value = "_ -> new", pure = true)
abstract fun withAuthor(author: Component): WrittenBookMeta

Creates new item metadata with the given author.

Link copied to clipboard
abstract override fun withCanDestroy(blocks: Collection<Block>): WrittenBookMeta

Creates new item metadata with the given can destroy blocks.

Link copied to clipboard
abstract override fun withCanPlaceOn(blocks: Collection<Block>): WrittenBookMeta

Creates new item metadata with the given can destroy blocks.

Link copied to clipboard
abstract override fun withCustomModelData(data: Int): WrittenBookMeta

Creates new item metadata with the given custom model data.

Link copied to clipboard
abstract override fun withDamage(damage: Int): WrittenBookMeta

Creates new item metadata with the given damage.

Link copied to clipboard
@Contract(value = "_ -> new", pure = true)
abstract fun withGeneration(generation: WrittenBookGeneration): WrittenBookMeta

Creates new item metadata with the given generation.

Link copied to clipboard
abstract override fun withHideFlag(flag: ItemFlag): WrittenBookMeta

Creates new item metadata with the given hide flag set.

Link copied to clipboard
abstract override fun withHideFlags(flags: Int): WrittenBookMeta

Creates new item metadata with the given hide flags.

Link copied to clipboard
abstract override fun withLore(lore: List<Component>): WrittenBookMeta

Creates new item metadata with the given lore.

abstract override fun withLore(lore: Component): WrittenBookMeta

Creates new item metadata with the given lore line added to the bottom of the lore text.

Link copied to clipboard
abstract override fun withName(name: Component?): WrittenBookMeta

Creates new item metadata with the given name.

Link copied to clipboard

Creates new item metadata with the given modifier removed from the list of modifiers for this item.

Link copied to clipboard

Creates new item metadata without any modifiers.

Link copied to clipboard
abstract override fun withoutHideFlag(flag: ItemFlag): WrittenBookMeta

Creates new item metadata without the given hide flag set.

Link copied to clipboard
abstract override fun withoutLore(index: Int): WrittenBookMeta

Creates new item metadata with the lore line at the given index removed from the lore.

abstract override fun withoutLore(lore: Component): WrittenBookMeta

Creates new item metadata with the given lore line removed from the lore.

Link copied to clipboard
@Contract(value = "_ -> new", pure = true)
abstract fun withoutPage(index: Int): WrittenBookMeta

Creates new item metadata with the page at the given index removed from the pages.

@Contract(value = "_ -> new", pure = true)
abstract fun withoutPage(page: Component): WrittenBookMeta

Creates new item metadata with the given page removed from the pages.

Link copied to clipboard
@Contract(value = "_ -> new", pure = true)
abstract fun withPage(page: Component): WrittenBookMeta

Creates new item metadata with the given page added to the end of the pages.

Link copied to clipboard
@Contract(value = "_ -> new", pure = true)
abstract fun withPages(pages: Collection<Component>): WrittenBookMeta

Creates new item metadata with the given pages.

Link copied to clipboard
@Contract(value = "_ -> new", pure = true)
abstract fun withTitle(title: Component): WrittenBookMeta

Creates new item metadata with the given title.

Link copied to clipboard
abstract override fun withUnbreakable(unbreakable: Boolean): WrittenBookMeta

Creates new item metadata with the given unbreakable setting.

Properties

Link copied to clipboard
@get:JvmName(name = "attributeModifiers")
abstract val attributeModifiers: @Unmodifiable List<ItemAttributeModifier>

All of the attribute modifiers that will be applied to entities holding items with this metadata.

Link copied to clipboard
abstract val author: Component

The author of the written book.

Link copied to clipboard
@get:JvmName(name = "canDestroy")
abstract val canDestroy: @Unmodifiable Set<Block>

All of the blocks that the item can destroy.

Link copied to clipboard
@get:JvmName(name = "canPlaceOn")
abstract val canPlaceOn: @Unmodifiable Set<Block>

All of the blocks that the item can be placed on.

Link copied to clipboard
@get:JvmName(name = "customModelData")
abstract val customModelData: Int

The custom model data for the item.

Link copied to clipboard
@get:JvmName(name = "damage")
abstract val damage: Int

The current damage on the item.

Link copied to clipboard
@get:JvmName(name = "generation")
abstract val generation: WrittenBookGeneration

The generation of the written book.

Link copied to clipboard
@get:JvmName(name = "hideFlags")
abstract val hideFlags: Int

The flags that determine what is hidden for the item.

Link copied to clipboard
abstract val isUnbreakable: Boolean

If the item cannot be broken.

Link copied to clipboard
@get:JvmName(name = "lore")
abstract val lore: @Unmodifiable List<Component>

The lore of the item.

Link copied to clipboard
@get:JvmName(name = "name")
abstract val name: Component?

The display name of the item.

Link copied to clipboard
abstract override val pages: @Unmodifiable List<Component>

The pages written in the book.

Link copied to clipboard
abstract val title: Component

The title of the written book.