接口 FoodComponent.FoodEffect
- 所有超级接口:
ConfigurationSerializable
- 封闭接口:
- FoodComponent
An effect which may be applied by this item when eaten.
-
方法概要
修饰符和类型方法说明Gets the effect which may be applied.float
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
Gets the effect which may be applied.- 返回:
- the effect
-
setEffect
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.
-