程序包 org.bukkit.inventory.meta.components

# 接口 FoodComponent.FoodEffect

所有超级接口:
  `ConfigurationSerializable`

封闭接口:
  FoodComponent

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

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@NotNull PotionEffect`
  `getEffect()`
  Gets the effect which may be applied.
  `float`
  `getProbability()`
  Gets the probability of this effect being applied.
  `void`
  `setEffect(@NotNull PotionEffect effect)`
  Sets the effect which may be applied.
  `void`
  `setProbability(float probability)`
  Sets the probability of this effect being applied.

  ### 从接口继承的方法 org.bukkit.configuration.serialization.ConfigurationSerializable

  `serialize`

- ## 方法详细资料

  - ### getEffect

    @NotNull @NotNull PotionEffect getEffect()
    Gets the effect which may be applied.
    返回:
      the effect

  - ### setEffect

    void setEffect(@NotNull @NotNull PotionEffect effect)
    Sets the effect which may be applied.
    参数:
      `effect` - the new effect

  - ### getProbability

    float getProbability()
    Gets the probability of this effect being applied.
    返回:
      probability

  - ### setProbability

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