|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PotionMeta
Represents a potion (Material.POTION
) that can have custom effects.
Method Summary | |
---|---|
boolean |
addCustomEffect(PotionEffect effect,
boolean overwrite)
Adds a custom potion effect to this potion. |
boolean |
clearCustomEffects()
Removes all custom potion effects from this potion. |
PotionMeta |
clone()
|
List<PotionEffect> |
getCustomEffects()
Gets an immutable list containing all custom potion effects applied to this potion. |
boolean |
hasCustomEffect(PotionEffectType type)
Checks for a specific custom potion effect type on this potion. |
boolean |
hasCustomEffects()
Checks for the presence of custom potion effects. |
boolean |
removeCustomEffect(PotionEffectType type)
Removes a custom potion effect from this potion. |
boolean |
setMainEffect(PotionEffectType type)
Moves a potion effect to the top of the potion effect list. |
Methods inherited from interface org.bukkit.inventory.meta.ItemMeta |
---|
addEnchant, getDisplayName, getEnchantLevel, getEnchants, getLore, hasDisplayName, hasEnchant, hasEnchants, hasLore, removeEnchant, setDisplayName, setLore |
Methods inherited from interface org.bukkit.configuration.serialization.ConfigurationSerializable |
---|
serialize |
Method Detail |
---|
boolean hasCustomEffects()
List<PotionEffect> getCustomEffects()
boolean addCustomEffect(PotionEffect effect, boolean overwrite)
effect
- the potion effect to addoverwrite
- true if any existing effect of the same type should be overwritten
boolean removeCustomEffect(PotionEffectType type)
type
- the potion effect type to remove
boolean hasCustomEffect(PotionEffectType type)
type
- the potion effect type to check for
boolean setMainEffect(PotionEffectType type)
type
- the potion effect type to move
boolean clearCustomEffects()
PotionMeta clone()
clone
in interface ItemMeta
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |