Class BookMetaMock
java.lang.Object
be.seeseemelk.mockbukkit.inventory.meta.ItemMetaMock
be.seeseemelk.mockbukkit.inventory.meta.BookMetaMock
- All Implemented Interfaces:
PersistentDataViewHolder,Cloneable,net.kyori.adventure.inventory.Book,net.kyori.adventure.util.Buildable<net.kyori.adventure.inventory.Book,,net.kyori.adventure.inventory.Book.Builder> net.kyori.examination.Examinable,ConfigurationSerializable,BookMeta,Damageable,ItemMeta,Repairable,WritableBookMeta,PersistentDataHolder
Mock implementation of a
BookMeta.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.kyori.adventure.inventory.Book
net.kyori.adventure.inventory.Book.BuilderNested classes/interfaces inherited from interface org.bukkit.inventory.meta.BookMeta
BookMeta.BookMetaBuilder, BookMeta.Generation, BookMeta.Spigot -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newBookMetaMock.BookMetaMock(@NotNull BookMeta meta) Constructs a newBookMetaMock, cloning the data from another. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.voidaddPages(@NotNull net.kyori.adventure.text.Component... pages) @Nullable net.kyori.adventure.text.Componentauthor()@NotNull BookMetaauthor(@Nullable net.kyori.adventure.text.Component author) @NotNull BookMetaMockclone()static @NotNull BookMetaMockdeserialize(@NotNull Map<String, Object> args) Required method for Bukkit deserialization.boolean@Nullable String@Nullable BookMeta.Generation@NotNull StringgetPage(int page) Deprecated.intgetPages()Deprecated.@Nullable StringgetTitle()protected StringbooleanbooleaninthashCode()booleanhasPages()booleanhasTitle()@NotNull net.kyori.adventure.text.Componentpage(int page) voidpage(int page, @NotNull net.kyori.adventure.text.Component data) @Unmodifiable @NotNull List<net.kyori.adventure.text.Component> pages()@NotNull net.kyori.adventure.inventory.BookSerializes the properties of an BookMetaMock to a HashMap.voidvoidsetGeneration(@Nullable BookMeta.Generation generation) voidDeprecated.voidDeprecated.voidDeprecated.boolean@NotNull BookMeta.Spigotspigot()@Nullable net.kyori.adventure.text.Componenttitle()@NotNull BookMetatitle(@Nullable net.kyori.adventure.text.Component title) @NonNull BookMeta.BookMetaBuilderMethods inherited from class be.seeseemelk.mockbukkit.inventory.meta.ItemMetaMock
addAttributeModifier, addEnchant, addItemFlags, assertComponentLore, assertHasNoLore, assertLore, assertLore, deserializeInternal, displayName, displayName, getAsComponentString, getAsString, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getCanDestroy, getCanPlaceOn, getCustomModelData, getCustomTagContainer, getDamage, getDestroyableKeys, getDisplayName, getDisplayNameComponent, getEnchantLevel, getEnchantmentGlintOverride, getEnchants, getFood, getItemFlags, getItemName, getJukeboxPlayable, getLocalizedName, getLore, getLoreComponents, getMaxDamage, getMaxStackSize, getPersistentDataContainer, getPlaceableKeys, getRarity, getRepairCost, getTool, hasAttributeModifiers, hasConflictingEnchant, hasCustomModelData, hasDamage, hasDamageValue, hasDestroyableKeys, hasDisplayName, hasEnchant, hasEnchantmentGlintOverride, hasEnchants, hasFood, hasItemFlag, hasItemName, hasJukeboxPlayable, hasLocalizedName, hasLore, hasMaxDamage, hasMaxStackSize, hasPlaceableKeys, hasRarity, hasRepairCost, hasTool, isFireResistant, isHideTooltip, isUnbreakable, itemName, itemName, lore, lore, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeEnchantments, removeItemFlags, resetDamage, setAttributeModifiers, setCanDestroy, setCanPlaceOn, setCustomModelData, setDamage, setDestroyableKeys, setDisplayName, setDisplayNameComponent, setEnchantmentGlintOverride, setFireResistant, setFood, setHideTooltip, setItemName, setJukeboxPlayable, setLocalizedName, setLore, setLoreComponents, setMaxDamage, setMaxStackSize, setPlaceableKeys, setRarity, setRepairCost, setTool, setUnbreakable, setVersion, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.kyori.adventure.inventory.Book
pagesMethods inherited from interface net.kyori.examination.Examinable
examinableName, examinableProperties, examineMethods inherited from interface org.bukkit.inventory.meta.ItemMeta
addAttributeModifier, addEnchant, addItemFlags, displayName, displayName, getAsComponentString, getAsString, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getCanDestroy, getCanPlaceOn, getCustomModelData, getCustomTagContainer, getDestroyableKeys, getDisplayName, getDisplayNameComponent, getEnchantLevel, getEnchantmentGlintOverride, getEnchants, getFood, getItemFlags, getItemName, getJukeboxPlayable, getLocalizedName, getLore, getLoreComponents, getMaxStackSize, getPlaceableKeys, getRarity, getTool, hasAttributeModifiers, hasConflictingEnchant, hasCustomModelData, hasDestroyableKeys, hasDisplayName, hasEnchant, hasEnchantmentGlintOverride, hasEnchants, hasFood, hasItemFlag, hasItemName, hasJukeboxPlayable, hasLocalizedName, hasLore, hasMaxStackSize, hasPlaceableKeys, hasRarity, hasTool, isFireResistant, isHideTooltip, isUnbreakable, itemName, itemName, lore, lore, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeEnchantments, removeItemFlags, setAttributeModifiers, setCanDestroy, setCanPlaceOn, setCustomModelData, setDestroyableKeys, setDisplayName, setDisplayNameComponent, setEnchantmentGlintOverride, setFireResistant, setFood, setHideTooltip, setItemName, setJukeboxPlayable, setLocalizedName, setLore, setLoreComponents, setMaxStackSize, setPlaceableKeys, setRarity, setTool, setUnbreakable, setVersionMethods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
-
Constructor Details
-
BookMetaMock
public BookMetaMock()Constructs a newBookMetaMock. -
BookMetaMock
Constructs a newBookMetaMock, cloning the data from another.- Parameters:
meta- The meta to clone.
-
-
Method Details
-
hashCode
public int hashCode()- Overrides:
hashCodein classItemMetaMock
-
equals
- Overrides:
equalsin classItemMetaMock
-
hasTitle
public boolean hasTitle() -
hasPages
public boolean hasPages()- Specified by:
hasPagesin interfaceWritableBookMeta
-
title
@Nullable public @Nullable net.kyori.adventure.text.Component title() -
title
@NotNull public @NotNull BookMeta title(@Nullable @Nullable net.kyori.adventure.text.Component title) -
author
@Nullable public @Nullable net.kyori.adventure.text.Component author() -
author
@NotNull public @NotNull BookMeta author(@Nullable @Nullable net.kyori.adventure.text.Component author) -
pages
- Specified by:
pagesin interfacenet.kyori.adventure.inventory.Book
-
pages
@NotNull public @NotNull net.kyori.adventure.inventory.Book pages(@NotNull @NotNull List<net.kyori.adventure.text.Component> pages) - Specified by:
pagesin interfacenet.kyori.adventure.inventory.Book
-
page
@NotNull public @NotNull net.kyori.adventure.text.Component page(int page) -
page
public void page(int page, @NotNull @NotNull net.kyori.adventure.text.Component data) -
addPages
public void addPages(@NotNull @NotNull net.kyori.adventure.text.Component... pages) -
toBuilder
-
getTitle
-
setTitle
-
hasAuthor
public boolean hasAuthor() -
getAuthor
-
setAuthor
-
getPage
Deprecated.- Specified by:
getPagein interfaceBookMeta- Specified by:
getPagein interfaceWritableBookMeta
-
setPage
Deprecated.- Specified by:
setPagein interfaceBookMeta- Specified by:
setPagein interfaceWritableBookMeta
-
getPages
Deprecated.- Specified by:
getPagesin interfaceBookMeta- Specified by:
getPagesin interfaceWritableBookMeta
-
setPages
Deprecated.- Specified by:
setPagesin interfaceBookMeta- Specified by:
setPagesin interfaceWritableBookMeta
-
setPages
Deprecated.- Specified by:
setPagesin interfaceBookMeta- Specified by:
setPagesin interfaceWritableBookMeta
-
addPage
Deprecated.- Specified by:
addPagein interfaceBookMeta- Specified by:
addPagein interfaceWritableBookMeta
-
getPageCount
public int getPageCount()- Specified by:
getPageCountin interfaceWritableBookMeta
-
clone
- Specified by:
clonein interfaceBookMeta- Specified by:
clonein interfaceDamageable- Specified by:
clonein interfaceItemMeta- Specified by:
clonein interfaceRepairable- Specified by:
clonein interfaceWritableBookMeta- Overrides:
clonein classItemMetaMock
-
hasGeneration
public boolean hasGeneration()- Specified by:
hasGenerationin interfaceBookMeta
-
getGeneration
- Specified by:
getGenerationin interfaceBookMeta
-
setGeneration
- Specified by:
setGenerationin interfaceBookMeta
-
spigot
-
deserialize
Required method for Bukkit deserialization.- Parameters:
args- A serialized BookMetaMock object in a Map<String, Object> format.- Returns:
- A new instance of the BookMetaMock class.
-
serialize
Serializes the properties of an BookMetaMock to a HashMap. Unimplemented properties are not present in the map.- Specified by:
serializein interfaceConfigurationSerializable- Overrides:
serializein classItemMetaMock- Returns:
- A HashMap of String, Object pairs representing the BookMetaMock.
-
getTypeName
- Overrides:
getTypeNamein classItemMetaMock
-