Class PotionMetaMock
java.lang.Object
be.seeseemelk.mockbukkit.inventory.meta.ItemMetaMock
be.seeseemelk.mockbukkit.inventory.meta.PotionMetaMock
- All Implemented Interfaces:
Cloneable,org.bukkit.configuration.serialization.ConfigurationSerializable,org.bukkit.inventory.meta.Damageable,org.bukkit.inventory.meta.ItemMeta,org.bukkit.inventory.meta.PotionMeta,org.bukkit.inventory.meta.Repairable,org.bukkit.persistence.PersistentDataHolder
Mock implementation of a
PotionMeta.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newPotionMetaMock.PotionMetaMock(@NotNull org.bukkit.inventory.meta.PotionMeta meta) Constructs a newPotionMetaMock, cloning the data from another. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddCustomEffect(@NotNull org.bukkit.potion.PotionEffect effect, boolean overwrite) boolean@NotNull PotionMetaMockclone()static @NotNull PotionMetaMockdeserialize(@NotNull Map<String, Object> args) Required method for Bukkit deserialization.boolean@Nullable org.bukkit.potion.PotionData@NotNull org.bukkit.potion.PotionType@Nullable org.bukkit.ColorgetColor()@NotNull List<org.bukkit.potion.PotionEffect> protected StringbooleanbooleanhasColor()booleanhasCustomEffect(@NotNull org.bukkit.potion.PotionEffectType type) booleaninthashCode()booleanremoveCustomEffect(@NotNull org.bukkit.potion.PotionEffectType type) Serializes the properties of an PotionMetaMock to a HashMap.voidsetBasePotionData(@Nullable org.bukkit.potion.PotionData data) voidsetBasePotionType(@NotNull org.bukkit.potion.PotionType type) voidsetColor(@Nullable org.bukkit.Color color) booleansetMainEffect(@NotNull org.bukkit.potion.PotionEffectType type) Deprecated.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
-
PotionMetaMock
public PotionMetaMock()Constructs a newPotionMetaMock. -
PotionMetaMock
public PotionMetaMock(@NotNull @NotNull org.bukkit.inventory.meta.PotionMeta meta) 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 interfaceorg.bukkit.inventory.meta.Damageable- Specified by:
clonein interfaceorg.bukkit.inventory.meta.ItemMeta- Specified by:
clonein interfaceorg.bukkit.inventory.meta.PotionMeta- Specified by:
clonein interfaceorg.bukkit.inventory.meta.Repairable- Overrides:
clonein classItemMetaMock
-
addCustomEffect
public boolean addCustomEffect(@NotNull @NotNull org.bukkit.potion.PotionEffect effect, boolean overwrite) - Specified by:
addCustomEffectin interfaceorg.bukkit.inventory.meta.PotionMeta
-
clearCustomEffects
public boolean clearCustomEffects()- Specified by:
clearCustomEffectsin interfaceorg.bukkit.inventory.meta.PotionMeta
-
getCustomEffects
- Specified by:
getCustomEffectsin interfaceorg.bukkit.inventory.meta.PotionMeta
-
hasCustomEffect
public boolean hasCustomEffect(@NotNull @NotNull org.bukkit.potion.PotionEffectType type) - Specified by:
hasCustomEffectin interfaceorg.bukkit.inventory.meta.PotionMeta
-
hasCustomEffects
public boolean hasCustomEffects()- Specified by:
hasCustomEffectsin interfaceorg.bukkit.inventory.meta.PotionMeta
-
removeCustomEffect
public boolean removeCustomEffect(@NotNull @NotNull org.bukkit.potion.PotionEffectType type) - Specified by:
removeCustomEffectin interfaceorg.bukkit.inventory.meta.PotionMeta
-
hasColor
public boolean hasColor()- Specified by:
hasColorin interfaceorg.bukkit.inventory.meta.PotionMeta
-
getColor
@Nullable public @Nullable org.bukkit.Color getColor()- Specified by:
getColorin interfaceorg.bukkit.inventory.meta.PotionMeta
-
setColor
public void setColor(@Nullable @Nullable org.bukkit.Color color) - Specified by:
setColorin interfaceorg.bukkit.inventory.meta.PotionMeta
-
setBasePotionData
public void setBasePotionData(@Nullable @Nullable org.bukkit.potion.PotionData data) - Specified by:
setBasePotionDatain interfaceorg.bukkit.inventory.meta.PotionMeta
-
getBasePotionData
@Nullable public @Nullable org.bukkit.potion.PotionData getBasePotionData()- Specified by:
getBasePotionDatain interfaceorg.bukkit.inventory.meta.PotionMeta
-
setBasePotionType
public void setBasePotionType(@NotNull @NotNull org.bukkit.potion.PotionType type) - Specified by:
setBasePotionTypein interfaceorg.bukkit.inventory.meta.PotionMeta
-
getBasePotionType
@NotNull public @NotNull org.bukkit.potion.PotionType getBasePotionType()- Specified by:
getBasePotionTypein interfaceorg.bukkit.inventory.meta.PotionMeta
-
hasBasePotionType
public boolean hasBasePotionType()- Specified by:
hasBasePotionTypein interfaceorg.bukkit.inventory.meta.PotionMeta
-
setMainEffect
@Deprecated(since="1.9") public boolean setMainEffect(@NotNull @NotNull org.bukkit.potion.PotionEffectType type) Deprecated.- Specified by:
setMainEffectin interfaceorg.bukkit.inventory.meta.PotionMeta
-
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 interfaceorg.bukkit.configuration.serialization.ConfigurationSerializable- Overrides:
serializein classItemMetaMock- Returns:
- A HashMap of String, Object pairs representing the PotionMetaMock.
-
getTypeName
- Overrides:
getTypeNamein classItemMetaMock
-