接口 ConsumableApplyEffects
Represent the effects applied when an item is consumed.
-
方法概要
修饰符和类型方法说明addEffect
(@NotNull PotionEffect effect) Adds an effect which may be applied by this item when consumed.Gets the effects which may be applied by this item when consumed.float
Gets the probability of this effect being applied.void
setEffects
(@NotNull List<PotionEffect> effects) Sets the effects which may be applied by this item when consumed.void
setProbability
(float probability) Sets the probability of this effect being applied.从接口继承的方法 org.bukkit.configuration.serialization.ConfigurationSerializable
serialize
-
方法详细资料
-
getEffects
Gets the effects which may be applied by this item when consumed.- 返回:
- consumable effects
-
setEffects
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.
-