Interface SuspiciousStewMeta

All Superinterfaces:
Cloneable, ConfigurationSerializable, ItemMeta, PersistentDataHolder, PersistentDataViewHolder

public interface SuspiciousStewMeta extends ItemMeta
Represents a suspicious stew that can have custom effects.
  • Method Details

    • hasCustomEffects

      boolean hasCustomEffects()
      Checks for the presence of custom potion effects.
      Returns:
      true if custom potion effects are applied
    • getCustomEffects

      @NotNull @NotNull List<PotionEffect> 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 boolean addCustomEffect(@NotNull @NotNull PotionEffect effect, boolean overwrite)
      Deprecated.
      use addCustomEffect(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 add
      overwrite - 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

      boolean addCustomEffect(@NotNull SuspiciousEffectEntry suspiciousEffectEntry, boolean overwrite)
      Adds a custom potion effect to this suspicious stew.
      Parameters:
      suspiciousEffectEntry - the suspicious effect entry to add
      overwrite - 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

      boolean removeCustomEffect(@NotNull @NotNull PotionEffectType type)
      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

      boolean hasCustomEffect(@NotNull @NotNull PotionEffectType type)
      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

      Specified by:
      clone in interface ItemMeta