Interface ConsumableApplyEffects
- All Superinterfaces:
- ConfigurationSerializable,- ConsumableEffect
Represent the effects applied when an item is consumed.
- 
Method SummaryModifier and TypeMethodDescriptionaddEffect(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.floatGets the probability of this effect being applied.voidsetEffects(List<PotionEffect> effects) Sets the effects which may be applied by this item when consumed.voidsetProbability(float probability) Sets the probability of this effect being applied.Methods inherited from interface org.bukkit.configuration.serialization.ConfigurationSerializableserialize
- 
Method Details- 
getEffectsGets the effects which may be applied by this item when consumed.- Returns:
- consumable effects
 
- 
setEffectsSets the effects which may be applied by this item when consumed.- Parameters:
- effects- new effects
 
- 
addEffectAdds an effect which may be applied by this item when consumed.- Parameters:
- effect- the effect
- Returns:
- the added 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.
 
 
-