Interface FoodComponent.FoodEffect
- All Superinterfaces:
ConfigurationSerializable
- Enclosing interface:
FoodComponent
An effect which may be applied by this item when eaten.
-
Method Summary
Modifier and TypeMethodDescriptionGets the effect which may be applied.float
Gets the probability of this effect being applied.void
setEffect
(PotionEffect effect) Sets the effect which may be applied.void
setProbability
(float probability) Sets the probability of this effect being applied.Methods inherited from interface org.bukkit.configuration.serialization.ConfigurationSerializable
serialize
-
Method Details
-
getEffect
Gets the effect which may be applied.- Returns:
- the effect
-
setEffect
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.
-