Interface FoodComponent.FoodEffect

All Superinterfaces:
ConfigurationSerializable
Enclosing interface:
FoodComponent

public static interface FoodComponent.FoodEffect extends ConfigurationSerializable
An effect which may be applied by this item when eaten.
  • Method Details

    • getEffect

      Gets the effect which may be applied.
      Returns:
      the effect
    • setEffect

      void setEffect(@NotNull @NotNull PotionEffect effect)
      Sets the effect which may be applied.
      Parameters:
      effect - the new effect
    • getProbability

      float getProbability()
      Gets the probability of this effect being applied.
      Returns:
      probability
    • setProbability

      void setProbability(float probability)
      Sets the probability of this effect being applied.
      Parameters:
      probability - between 0 and 1 inclusive.