Class BookMetaMock
java.lang.Object
be.seeseemelk.mockbukkit.inventory.meta.ItemMetaMock
be.seeseemelk.mockbukkit.inventory.meta.BookMetaMock
- All Implemented Interfaces:
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,org.bukkit.configuration.serialization.ConfigurationSerializable,org.bukkit.inventory.meta.BookMeta,org.bukkit.inventory.meta.Damageable,org.bukkit.inventory.meta.ItemMeta,org.bukkit.inventory.meta.Repairable,org.bukkit.inventory.meta.WritableBookMeta,org.bukkit.persistence.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
org.bukkit.inventory.meta.BookMeta.BookMetaBuilder, org.bukkit.inventory.meta.BookMeta.Generation, org.bukkit.inventory.meta.BookMeta.Spigot -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newBookMetaMock.BookMetaMock(@NotNull org.bukkit.inventory.meta.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 org.bukkit.inventory.meta.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 org.bukkit.inventory.meta.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 org.bukkit.inventory.meta.BookMeta.Generation generation) voidDeprecated.voidDeprecated.voidDeprecated.boolean@NotNull org.bukkit.inventory.meta.BookMeta.Spigotspigot()@Nullable net.kyori.adventure.text.Componenttitle()@NotNull org.bukkit.inventory.meta.BookMetatitle(@Nullable net.kyori.adventure.text.Component title) @NonNull org.bukkit.inventory.meta.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, getCustomModelData, getCustomTagContainer, getDamage, getDisplayName, getDisplayNameComponent, getEnchantLevel, getEnchantmentGlintOverride, getEnchants, getFood, getItemFlags, getItemName, getLocalizedName, getLore, getLoreComponents, getMaxDamage, getMaxStackSize, getPersistentDataContainer, getRarity, getRepairCost, getTool, hasAttributeModifiers, hasConflictingEnchant, hasCustomModelData, hasDamage, hasDisplayName, hasEnchant, hasEnchantmentGlintOverride, hasEnchants, hasFood, hasItemFlag, hasItemName, hasLocalizedName, hasLore, hasMaxDamage, hasMaxStackSize, hasRarity, hasRepairCost, hasTool, isFireResistant, isHideTooltip, isUnbreakable, itemName, itemName, lore, lore, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeEnchantments, removeItemFlags, setAttributeModifiers, setCustomModelData, setDamage, setDisplayName, setDisplayNameComponent, setEnchantmentGlintOverride, setFireResistant, setFood, setHideTooltip, setItemName, setLocalizedName, setLore, setLoreComponents, setMaxDamage, setMaxStackSize, 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, getCustomModelData, getCustomTagContainer, getDisplayName, getDisplayNameComponent, getEnchantLevel, getEnchantmentGlintOverride, getEnchants, getFood, getItemFlags, getItemName, getLocalizedName, getLore, getLoreComponents, getMaxStackSize, getRarity, getTool, hasAttributeModifiers, hasConflictingEnchant, hasCustomModelData, hasDisplayName, hasEnchant, hasEnchantmentGlintOverride, hasEnchants, hasFood, hasItemFlag, hasItemName, hasLocalizedName, hasLore, hasMaxStackSize, hasRarity, hasTool, isFireResistant, isHideTooltip, isUnbreakable, itemName, itemName, lore, lore, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeEnchantments, removeItemFlags, setAttributeModifiers, setCustomModelData, setDisplayName, setDisplayNameComponent, setEnchantmentGlintOverride, setFireResistant, setFood, setHideTooltip, setItemName, setLocalizedName, setLore, setLoreComponents, setMaxStackSize, setRarity, setTool, setUnbreakable, setVersionMethods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
-
Constructor Details
-
BookMetaMock
public BookMetaMock()Constructs a newBookMetaMock. -
BookMetaMock
public BookMetaMock(@NotNull @NotNull org.bukkit.inventory.meta.BookMeta meta) 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()- Specified by:
hasTitlein interfaceorg.bukkit.inventory.meta.BookMeta
-
hasPages
public boolean hasPages()- Specified by:
hasPagesin interfaceorg.bukkit.inventory.meta.WritableBookMeta
-
title
@Nullable public @Nullable net.kyori.adventure.text.Component title()- Specified by:
titlein interfacenet.kyori.adventure.inventory.Book- Specified by:
titlein interfaceorg.bukkit.inventory.meta.BookMeta
-
title
@NotNull public @NotNull org.bukkit.inventory.meta.BookMeta title(@Nullable @Nullable net.kyori.adventure.text.Component title) - Specified by:
titlein interfacenet.kyori.adventure.inventory.Book- Specified by:
titlein interfaceorg.bukkit.inventory.meta.BookMeta
-
author
@Nullable public @Nullable net.kyori.adventure.text.Component author()- Specified by:
authorin interfacenet.kyori.adventure.inventory.Book- Specified by:
authorin interfaceorg.bukkit.inventory.meta.BookMeta
-
author
@NotNull public @NotNull org.bukkit.inventory.meta.BookMeta author(@Nullable @Nullable net.kyori.adventure.text.Component author) - Specified by:
authorin interfacenet.kyori.adventure.inventory.Book- Specified by:
authorin interfaceorg.bukkit.inventory.meta.BookMeta
-
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) - Specified by:
pagein interfaceorg.bukkit.inventory.meta.BookMeta
-
page
public void page(int page, @NotNull @NotNull net.kyori.adventure.text.Component data) - Specified by:
pagein interfaceorg.bukkit.inventory.meta.BookMeta
-
addPages
public void addPages(@NotNull @NotNull net.kyori.adventure.text.Component... pages) - Specified by:
addPagesin interfaceorg.bukkit.inventory.meta.BookMeta
-
toBuilder
public @NonNull org.bukkit.inventory.meta.BookMeta.BookMetaBuilder toBuilder()- Specified by:
toBuilderin interfacenet.kyori.adventure.inventory.Book- Specified by:
toBuilderin interfaceorg.bukkit.inventory.meta.BookMeta- Specified by:
toBuilderin interfacenet.kyori.adventure.util.Buildable<net.kyori.adventure.inventory.Book,net.kyori.adventure.inventory.Book.Builder>
-
getTitle
- Specified by:
getTitlein interfaceorg.bukkit.inventory.meta.BookMeta
-
setTitle
- Specified by:
setTitlein interfaceorg.bukkit.inventory.meta.BookMeta
-
hasAuthor
public boolean hasAuthor()- Specified by:
hasAuthorin interfaceorg.bukkit.inventory.meta.BookMeta
-
getAuthor
- Specified by:
getAuthorin interfaceorg.bukkit.inventory.meta.BookMeta
-
setAuthor
- Specified by:
setAuthorin interfaceorg.bukkit.inventory.meta.BookMeta
-
getPage
Deprecated.- Specified by:
getPagein interfaceorg.bukkit.inventory.meta.BookMeta- Specified by:
getPagein interfaceorg.bukkit.inventory.meta.WritableBookMeta
-
setPage
Deprecated.- Specified by:
setPagein interfaceorg.bukkit.inventory.meta.BookMeta- Specified by:
setPagein interfaceorg.bukkit.inventory.meta.WritableBookMeta
-
getPages
Deprecated.- Specified by:
getPagesin interfaceorg.bukkit.inventory.meta.BookMeta- Specified by:
getPagesin interfaceorg.bukkit.inventory.meta.WritableBookMeta
-
setPages
Deprecated.- Specified by:
setPagesin interfaceorg.bukkit.inventory.meta.BookMeta- Specified by:
setPagesin interfaceorg.bukkit.inventory.meta.WritableBookMeta
-
setPages
Deprecated.- Specified by:
setPagesin interfaceorg.bukkit.inventory.meta.BookMeta- Specified by:
setPagesin interfaceorg.bukkit.inventory.meta.WritableBookMeta
-
addPage
Deprecated.- Specified by:
addPagein interfaceorg.bukkit.inventory.meta.BookMeta- Specified by:
addPagein interfaceorg.bukkit.inventory.meta.WritableBookMeta
-
getPageCount
public int getPageCount()- Specified by:
getPageCountin interfaceorg.bukkit.inventory.meta.WritableBookMeta
-
clone
- Specified by:
clonein interfaceorg.bukkit.inventory.meta.BookMeta- Specified by:
clonein interfaceorg.bukkit.inventory.meta.Damageable- Specified by:
clonein interfaceorg.bukkit.inventory.meta.ItemMeta- Specified by:
clonein interfaceorg.bukkit.inventory.meta.Repairable- Specified by:
clonein interfaceorg.bukkit.inventory.meta.WritableBookMeta- Overrides:
clonein classItemMetaMock
-
hasGeneration
public boolean hasGeneration()- Specified by:
hasGenerationin interfaceorg.bukkit.inventory.meta.BookMeta
-
getGeneration
@Nullable public @Nullable org.bukkit.inventory.meta.BookMeta.Generation getGeneration()- Specified by:
getGenerationin interfaceorg.bukkit.inventory.meta.BookMeta
-
setGeneration
public void setGeneration(@Nullable @Nullable org.bukkit.inventory.meta.BookMeta.Generation generation) - Specified by:
setGenerationin interfaceorg.bukkit.inventory.meta.BookMeta
-
spigot
@NotNull public @NotNull org.bukkit.inventory.meta.BookMeta.Spigot spigot()- Specified by:
spigotin interfaceorg.bukkit.inventory.meta.BookMeta
-
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 interfaceorg.bukkit.configuration.serialization.ConfigurationSerializable- Overrides:
serializein classItemMetaMock- Returns:
- A HashMap of String, Object pairs representing the BookMetaMock.
-
getTypeName
- Overrides:
getTypeNamein classItemMetaMock
-