Package org.bukkit.inventory.meta
Interface SuspiciousStewMeta
- All Superinterfaces:
Cloneable
,ConfigurationSerializable
,ItemMeta
,PersistentDataHolder
,PersistentDataViewHolder
Represents a suspicious stew that can have custom effects.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addCustomEffect
(SuspiciousEffectEntry suspiciousEffectEntry, boolean overwrite) Adds a custom potion effect to this suspicious stew.boolean
addCustomEffect
(@NotNull PotionEffect effect, boolean overwrite) Deprecated.boolean
Removes all custom potion effects from this suspicious stew.clone()
Gets an immutable list containing all custom potion effects applied to this suspicious stew.boolean
Checks for a specific custom potion effect type on this suspicious stew.boolean
Checks for the presence of custom potion effects.boolean
Removes a custom potion effect from this suspicious stew.Methods inherited from interface org.bukkit.configuration.serialization.ConfigurationSerializable
serialize
Methods inherited from interface org.bukkit.inventory.meta.ItemMeta
addAttributeModifier, addEnchant, addItemFlags, displayName, displayName, getAsComponentString, getAsString, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getCanDestroy, getCanPlaceOn, getCustomModelData, 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, 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, setVersion
Methods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
-
Method Details
-
hasCustomEffects
boolean hasCustomEffects()Checks for the presence of custom potion effects.- Returns:
- true if custom potion effects are applied
-
getCustomEffects
Gets an immutable list containing all custom potion effects applied to this suspicious stew.Plugins should check that hasCustomEffects() returns true before calling this method.
- Returns:
- the immutable list of custom potion effects
-
addCustomEffect
Deprecated.useaddCustomEffect(io.papermc.paper.potion.SuspiciousEffectEntry, boolean)
as PotionEffect suggests that all attributes are used. In fact, only the PotionEffectType and the duration are used.Adds a custom potion effect to this suspicious stew.- Parameters:
effect
- the potion effect to addoverwrite
- true if any existing effect of the same type should be overwritten- Returns:
- true if the suspicious stew meta changed as a result of this call
-
addCustomEffect
Adds a custom potion effect to this suspicious stew.- Parameters:
suspiciousEffectEntry
- the suspicious effect entry to addoverwrite
- true if any existing effect of the same type should be overwritten- Returns:
- true if the suspicious stew meta changed as a result of this call as a result of this call
-
removeCustomEffect
Removes a custom potion effect from this suspicious stew.- Parameters:
type
- the potion effect type to remove- Returns:
- true if the suspicious stew meta changed as a result of this call
-
hasCustomEffect
Checks for a specific custom potion effect type on this suspicious stew.- Parameters:
type
- the potion effect type to check for- Returns:
- true if the suspicious stew has this effect
-
clearCustomEffects
boolean clearCustomEffects()Removes all custom potion effects from this suspicious stew.- Returns:
- true if the suspicious stew meta changed as a result of this call
-
clone
SuspiciousStewMeta clone()
-
addCustomEffect(io.papermc.paper.potion.SuspiciousEffectEntry, boolean)
as PotionEffect suggests that all attributes are used.