接口 ConsumableApplyEffects

所有超级接口:
ConfigurationSerializable, ConsumableEffect

public interface ConsumableApplyEffects extends ConsumableEffect
Represent the effects applied when an item is consumed.
  • 方法详细资料

    • getEffects

      Gets the effects which may be applied by this item when consumed.
      返回:
      consumable effects
    • setEffects

      void setEffects(@NotNull @NotNull List<PotionEffect> effects)
      Sets the effects which may be applied by this item when consumed.
      参数:
      effects - new effects
    • addEffect

      Adds an effect which may be applied by this item when consumed.
      参数:
      effect - the effect
      返回:
      the added 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.