Interface FoodComponent.FoodEffect
- All Superinterfaces:
- ConfigurationSerializable
- Enclosing interface:
- FoodComponent
An effect which may be applied by this item when eaten.
- 
Method SummaryModifier and TypeMethodDescriptionGets the effect which may be applied.floatGets the probability of this effect being applied.voidsetEffect(@NotNull PotionEffect effect) Sets the effect which may be applied.voidsetProbability(float probability) Sets the probability of this effect being applied.Methods inherited from interface org.bukkit.configuration.serialization.ConfigurationSerializableserialize
- 
Method Details- 
getEffectGets the effect which may be applied.- Returns:
- the effect
 
- 
setEffectSets the effect which may be applied.- Parameters:
- effect- the new effect
 
- 
getProbabilityfloat getProbability()Gets the probability of this effect being applied.- Returns:
- probability
 
- 
setProbabilityvoid setProbability(float probability) Sets the probability of this effect being applied.- Parameters:
- probability- between 0 and 1 inclusive.
 
 
-