Class PotionMetaMock
java.lang.Object
org.mockbukkit.mockbukkit.inventory.meta.ItemMetaMock
org.mockbukkit.mockbukkit.inventory.meta.PotionMetaMock
- All Implemented Interfaces:
PersistentDataViewHolder,Cloneable,ConfigurationSerializable,Damageable,ItemMeta,PotionMeta,Repairable,PersistentDataHolder
Mock implementation of a
PotionMeta.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newPotionMetaMock.PotionMetaMock(@NotNull ItemMeta meta) Constructs a newPotionMetaMock, cloning the data from another. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddCustomEffect(@NotNull PotionEffect effect, boolean overwrite) boolean@NotNull PotionMetaMockclone()static @NotNull PotionMetaMockdeserialize(@NotNull Map<String, Object> args) Required method for Bukkit deserialization.protected voiddeserializeInternal(@NotNull Map<String, Object> args) boolean@Nullable PotionData@Nullable PotionType@Nullable ColorgetColor()@NotNull List<PotionEffect> @Nullable Stringprotected StringbooleanbooleanhasColor()booleanhasCustomEffect(@NotNull PotionEffectType type) booleanbooleaninthashCode()booleanremoveCustomEffect(@NotNull PotionEffectType type) Serializes the properties of an PotionMetaMock to a HashMap.voidsetBasePotionData(@Nullable PotionData data) voidsetBasePotionType(@Nullable PotionType type) voidvoidsetCustomPotionName(@Nullable String customName) booleansetMainEffect(@NotNull PotionEffectType type) Deprecated.Methods inherited from class org.mockbukkit.mockbukkit.inventory.meta.ItemMetaMock
addAttributeModifier, addEnchant, addItemFlags, assertComponentLore, assertHasNoLore, assertLore, assertLore, customName, customName, getAsComponentString, getAsString, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getCanDestroy, getCanPlaceOn, getCustomModelData, getCustomModelDataComponent, getCustomTagContainer, getDamage, getDamageResistant, getDestroyableKeys, getDisplayName, getDisplayNameComponent, getEnchantable, getEnchantLevel, getEnchantmentGlintOverride, getEnchants, getEquippable, getFood, getItemFlags, getItemModel, getItemName, getJukeboxPlayable, getLocalizedName, getLore, getLoreComponents, getMaxDamage, getMaxStackSize, getPersistentDataContainer, getPlaceableKeys, getRarity, getRepairCost, getTool, getTooltipStyle, getUseCooldown, getUseRemainder, hasAttributeModifiers, hasConflictingEnchant, hasCustomModelData, hasCustomName, hasDamage, hasDamageResistant, hasDamageValue, hasDestroyableKeys, hasEnchant, hasEnchantable, hasEnchantmentGlintOverride, hasEnchants, hasEquippable, hasFood, hasItemFlag, hasItemModel, hasItemName, hasJukeboxPlayable, hasLocalizedName, hasLore, hasMaxDamage, hasMaxStackSize, hasPlaceableKeys, hasRarity, hasRepairCost, hasTool, hasTooltipStyle, hasUseCooldown, hasUseRemainder, isFireResistant, isGlider, isHideTooltip, isUnbreakable, itemName, itemName, lore, lore, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeEnchantments, removeItemFlags, resetDamage, setAttributeModifiers, setCanDestroy, setCanPlaceOn, setCustomModelData, setCustomModelDataComponent, setDamage, setDamageResistant, setDestroyableKeys, setDisplayName, setDisplayNameComponent, setEnchantable, setEnchantmentGlintOverride, setEquippable, setFireResistant, setFood, setGlider, setHideTooltip, setItemModel, setItemName, setJukeboxPlayable, setLocalizedName, setLore, setLoreComponents, setMaxDamage, setMaxStackSize, setPlaceableKeys, setRarity, setRepairCost, setTool, setTooltipStyle, setUnbreakable, setUseCooldown, setUseRemainder, 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, customName, customName, displayName, displayName, getAsComponentString, getAsString, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getCanDestroy, getCanPlaceOn, getCustomModelData, getCustomModelDataComponent, getCustomTagContainer, getDamageResistant, getDestroyableKeys, getDisplayName, getDisplayNameComponent, getEnchantable, getEnchantLevel, getEnchantmentGlintOverride, getEnchants, getEquippable, getFood, getItemFlags, getItemModel, getItemName, getJukeboxPlayable, getLocalizedName, getLore, getLoreComponents, getMaxStackSize, getPlaceableKeys, getRarity, getTool, getTooltipStyle, getUseCooldown, getUseRemainder, hasAttributeModifiers, hasConflictingEnchant, hasCustomModelData, hasDamageResistant, hasDestroyableKeys, hasDisplayName, hasEnchant, hasEnchantable, hasEnchantmentGlintOverride, hasEnchants, hasEquippable, hasFood, hasItemFlag, hasItemModel, hasItemName, hasJukeboxPlayable, hasLocalizedName, hasLore, hasMaxStackSize, hasPlaceableKeys, hasRarity, hasTool, hasTooltipStyle, hasUseCooldown, hasUseRemainder, isFireResistant, isGlider, isHideTooltip, isUnbreakable, itemName, itemName, lore, lore, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeEnchantments, removeItemFlags, setAttributeModifiers, setCanDestroy, setCanPlaceOn, setCustomModelData, setCustomModelDataComponent, setDamageResistant, setDestroyableKeys, setDisplayName, setDisplayNameComponent, setEnchantable, setEnchantmentGlintOverride, setEquippable, setFireResistant, setFood, setGlider, setHideTooltip, setItemModel, setItemName, setJukeboxPlayable, setLocalizedName, setLore, setLoreComponents, setMaxStackSize, setPlaceableKeys, setRarity, setTool, setTooltipStyle, setUnbreakable, setUseCooldown, setUseRemainder, setVersionMethods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainerMethods inherited from interface org.bukkit.inventory.meta.PotionMeta
getCustomName, hasCustomName, setCustomName
-
Constructor Details
-
PotionMetaMock
public PotionMetaMock()Constructs a newPotionMetaMock. -
PotionMetaMock
Constructs a newPotionMetaMock, 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 interfaceDamageable- Specified by:
clonein interfaceItemMeta- Specified by:
clonein interfacePotionMeta- Specified by:
clonein interfaceRepairable- Overrides:
clonein classItemMetaMock
-
addCustomEffect
- Specified by:
addCustomEffectin interfacePotionMeta
-
clearCustomEffects
public boolean clearCustomEffects()- Specified by:
clearCustomEffectsin interfacePotionMeta
-
getCustomEffects
- Specified by:
getCustomEffectsin interfacePotionMeta
-
hasCustomEffect
- Specified by:
hasCustomEffectin interfacePotionMeta
-
hasCustomEffects
public boolean hasCustomEffects()- Specified by:
hasCustomEffectsin interfacePotionMeta
-
removeCustomEffect
- Specified by:
removeCustomEffectin interfacePotionMeta
-
hasColor
public boolean hasColor()- Specified by:
hasColorin interfacePotionMeta
-
getColor
- Specified by:
getColorin interfacePotionMeta
-
setColor
- Specified by:
setColorin interfacePotionMeta
-
hasCustomPotionName
public boolean hasCustomPotionName()- Specified by:
hasCustomPotionNamein interfacePotionMeta
-
getCustomPotionName
- Specified by:
getCustomPotionNamein interfacePotionMeta
-
setCustomPotionName
- Specified by:
setCustomPotionNamein interfacePotionMeta
-
setBasePotionData
- Specified by:
setBasePotionDatain interfacePotionMeta
-
getBasePotionData
- Specified by:
getBasePotionDatain interfacePotionMeta
-
setBasePotionType
- Specified by:
setBasePotionTypein interfacePotionMeta
-
getBasePotionType
- Specified by:
getBasePotionTypein interfacePotionMeta
-
hasBasePotionType
public boolean hasBasePotionType()- Specified by:
hasBasePotionTypein interfacePotionMeta
-
setMainEffect
Deprecated.- Specified by:
setMainEffectin interfacePotionMeta
-
deserializeInternal
- Overrides:
deserializeInternalin classItemMetaMock
-
deserialize
@NotNull public static @NotNull PotionMetaMock deserialize(@NotNull @NotNull Map<String, Object> args) Required method for Bukkit deserialization.- Parameters:
args- A serialized PotionMetaMock object in a Map<String, Object> format.- Returns:
- A new instance of the PotionMetaMock class.
-
serialize
Serializes the properties of an PotionMetaMock 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 PotionMetaMock.
-
getTypeName
- Overrides:
getTypeNamein classItemMetaMock
-