Class EnchantedBookMetaMock
java.lang.Object
be.seeseemelk.mockbukkit.inventory.meta.ItemMetaMock
be.seeseemelk.mockbukkit.inventory.meta.EnchantedBookMetaMock
- All Implemented Interfaces:
Cloneable,org.bukkit.configuration.serialization.ConfigurationSerializable,org.bukkit.inventory.meta.Damageable,org.bukkit.inventory.meta.EnchantmentStorageMeta,org.bukkit.inventory.meta.ItemMeta,org.bukkit.inventory.meta.Repairable,org.bukkit.persistence.PersistentDataHolder
public class EnchantedBookMetaMock
extends ItemMetaMock
implements org.bukkit.inventory.meta.EnchantmentStorageMeta
Mock implementation of an
EnchantmentStorageMeta.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newEnchantedBookMetaMock.EnchantedBookMetaMock(@NotNull org.bukkit.inventory.meta.EnchantmentStorageMeta meta) Constructs a newEnchantedBookMetaMock, cloning the data from another. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddStoredEnchant(@NotNull org.bukkit.enchantments.Enchantment ench, int level, boolean ignoreLevelRestriction) @NotNull EnchantedBookMetaMockclone()static @NotNull EnchantedBookMetaMockdeserialize(@NotNull Map<String, Object> args) Required method for Bukkit deserialization.booleanintgetStoredEnchantLevel(@NotNull org.bukkit.enchantments.Enchantment ench) protected StringbooleanhasConflictingStoredEnchant(@NotNull org.bukkit.enchantments.Enchantment ench) inthashCode()booleanhasStoredEnchant(@NotNull org.bukkit.enchantments.Enchantment ench) booleanbooleanremoveStoredEnchant(@NotNull org.bukkit.enchantments.Enchantment ench) Serializes the properties of an EnchantedBookMetaMock to a HashMap.Methods 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 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
-
EnchantedBookMetaMock
public EnchantedBookMetaMock()Constructs a newEnchantedBookMetaMock. -
EnchantedBookMetaMock
public EnchantedBookMetaMock(@NotNull @NotNull org.bukkit.inventory.meta.EnchantmentStorageMeta meta) Constructs a newEnchantedBookMetaMock, cloning the data from another.- Parameters:
meta- The meta to clone.
-
-
Method Details
-
hashCode
public int hashCode()- Overrides:
hashCodein classItemMetaMock
-
equals
- Overrides:
equalsin classItemMetaMock
-
clone
- Specified by:
clonein interfaceorg.bukkit.inventory.meta.Damageable- Specified by:
clonein interfaceorg.bukkit.inventory.meta.EnchantmentStorageMeta- Specified by:
clonein interfaceorg.bukkit.inventory.meta.ItemMeta- Specified by:
clonein interfaceorg.bukkit.inventory.meta.Repairable- Overrides:
clonein classItemMetaMock
-
addStoredEnchant
public boolean addStoredEnchant(@NotNull @NotNull org.bukkit.enchantments.Enchantment ench, int level, boolean ignoreLevelRestriction) - Specified by:
addStoredEnchantin interfaceorg.bukkit.inventory.meta.EnchantmentStorageMeta
-
getStoredEnchantLevel
public int getStoredEnchantLevel(@NotNull @NotNull org.bukkit.enchantments.Enchantment ench) - Specified by:
getStoredEnchantLevelin interfaceorg.bukkit.inventory.meta.EnchantmentStorageMeta
-
getStoredEnchants
- Specified by:
getStoredEnchantsin interfaceorg.bukkit.inventory.meta.EnchantmentStorageMeta
-
hasConflictingStoredEnchant
public boolean hasConflictingStoredEnchant(@NotNull @NotNull org.bukkit.enchantments.Enchantment ench) - Specified by:
hasConflictingStoredEnchantin interfaceorg.bukkit.inventory.meta.EnchantmentStorageMeta
-
hasStoredEnchant
public boolean hasStoredEnchant(@NotNull @NotNull org.bukkit.enchantments.Enchantment ench) - Specified by:
hasStoredEnchantin interfaceorg.bukkit.inventory.meta.EnchantmentStorageMeta
-
hasStoredEnchants
public boolean hasStoredEnchants()- Specified by:
hasStoredEnchantsin interfaceorg.bukkit.inventory.meta.EnchantmentStorageMeta
-
removeStoredEnchant
public boolean removeStoredEnchant(@NotNull @NotNull org.bukkit.enchantments.Enchantment ench) throws IllegalArgumentException - Specified by:
removeStoredEnchantin interfaceorg.bukkit.inventory.meta.EnchantmentStorageMeta- Throws:
IllegalArgumentException
-
deserialize
@NotNull public static @NotNull EnchantedBookMetaMock deserialize(@NotNull @NotNull Map<String, Object> args) Required method for Bukkit deserialization.- Parameters:
args- A serialized EnchantedBookMetaMock object in a Map<String, Object> format.- Returns:
- A new instance of the EnchantedBookMetaMock class.
-
serialize
Serializes the properties of an EnchantedBookMetaMock 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 EnchantedBookMetaMock.
-
getTypeName
- Overrides:
getTypeNamein classItemMetaMock
-