Interface ConsumableComponent
- All Superinterfaces:
- ConfigurationSerializable
Represents a component which item can be consumed on use.
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic enumRepresents the animations for an item being consumed.
- 
Method SummaryModifier and TypeMethodDescriptionaddEffect(ConsumableEffect effect) Adds an effect which may be applied by this item when consumed.Gets the animation used during consumption of the item.floatGets the time in seconds it will take for this item to be consumed.Gets the effects which may be applied by this item when consumed.getSound()Gets the sound to play during and on completion of the item's consumption.booleanGets whether consumption particles are emitted while consuming this item.voidsetAnimation(ConsumableComponent.Animation animation) Sets the animation used during consumption of the item.voidsetConsumeParticles(boolean consumeParticles) Sets whether consumption particles are emitted while consuming this item.voidsetConsumeSeconds(float consumeSeconds) Sets the time in seconds it will take for this item to be consumed.voidsetEffects(List<ConsumableEffect> effects) Sets the effects which may be applied by this item when consumed.voidSets the sound to play during and on completion of the item's consumption.Methods inherited from interface org.bukkit.configuration.serialization.ConfigurationSerializableserialize
- 
Method Details- 
getConsumeSecondsfloat getConsumeSeconds()Gets the time in seconds it will take for this item to be consumed.- Returns:
- consume time
 
- 
setConsumeSecondsvoid setConsumeSeconds(float consumeSeconds) Sets the time in seconds it will take for this item to be consumed.- Parameters:
- consumeSeconds- new consume time
 
- 
getAnimationGets the animation used during consumption of the item.- Returns:
- animation
 
- 
setAnimationSets the animation used during consumption of the item.- Parameters:
- animation- the new animation
 
- 
getSoundGets the sound to play during and on completion of the item's consumption.- Returns:
- the sound
 
- 
setSoundSets the sound to play during and on completion of the item's consumption.- Parameters:
- sound- sound or null for current default
 
- 
hasConsumeParticlesboolean hasConsumeParticles()Gets whether consumption particles are emitted while consuming this item.- Returns:
- true for particles emitted while consuming, false otherwise
 
- 
setConsumeParticlesvoid setConsumeParticles(boolean consumeParticles) Sets whether consumption particles are emitted while consuming this item.- Parameters:
- consumeParticles- if particles need to be emitted while consuming the item
 
- 
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
 
 
-