Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.inventory.meta.PotionMeta Interface Reference
Inheritance diagram for org.bukkit.inventory.meta.PotionMeta:
org.bukkit.inventory.meta.ItemMeta org.bukkit.configuration.serialization.ConfigurationSerializable

Public Member Functions

boolean hasCustomEffects ()
 
List< PotionEffectgetCustomEffects ()
 
boolean addCustomEffect (PotionEffect effect, boolean overwrite)
 
boolean removeCustomEffect (PotionEffectType type)
 
boolean hasCustomEffect (PotionEffectType type)
 
boolean setMainEffect (PotionEffectType type)
 
boolean clearCustomEffects ()
 
PotionMeta clone ()
 
- Public Member Functions inherited from org.bukkit.inventory.meta.ItemMeta
boolean hasDisplayName ()
 
String getDisplayName ()
 
void setDisplayName (String name)
 
boolean hasLore ()
 
List< String > getLore ()
 
void setLore (List< String > lore)
 
boolean hasEnchants ()
 
boolean hasEnchant (Enchantment ench)
 
int getEnchantLevel (Enchantment ench)
 
Map< Enchantment, Integer > getEnchants ()
 
boolean addEnchant (Enchantment ench, int level, boolean ignoreLevelRestriction)
 
boolean removeEnchant (Enchantment ench)
 
boolean hasConflictingEnchant (Enchantment ench)
 
- Public Member Functions inherited from org.bukkit.configuration.serialization.ConfigurationSerializable
Map< String, Object > serialize ()
 

Detailed Description

Represents a potion (Material#POTION) that can have custom effects.

Definition at line 12 of file PotionMeta.java.

Member Function Documentation

boolean org.bukkit.inventory.meta.PotionMeta.addCustomEffect ( PotionEffect  effect,
boolean  overwrite 
)

Adds a custom potion effect to this potion.

Parameters
effectthe potion effect to add
overwritetrue if any existing effect of the same type should be overwritten
Returns
true if the potion meta changed as a result of this call
boolean org.bukkit.inventory.meta.PotionMeta.clearCustomEffects ( )

Removes all custom potion effects from this potion.

Returns
true if the potion meta changed as a result of this call
List<PotionEffect> org.bukkit.inventory.meta.PotionMeta.getCustomEffects ( )

Gets an immutable list containing all custom potion effects applied to this potion.

Plugins should check that hasCustomEffects() returns true before calling this method.

Returns
the immutable list of custom potion effects
boolean org.bukkit.inventory.meta.PotionMeta.hasCustomEffect ( PotionEffectType  type)

Checks for a specific custom potion effect type on this potion.

Parameters
typethe potion effect type to check for
Returns
true if the potion has this effect
boolean org.bukkit.inventory.meta.PotionMeta.hasCustomEffects ( )

Checks for the presence of custom potion effects.

Returns
true if custom potion effects are applied
boolean org.bukkit.inventory.meta.PotionMeta.removeCustomEffect ( PotionEffectType  type)

Removes a custom potion effect from this potion.

Parameters
typethe potion effect type to remove
Returns
true if the potion meta changed as a result of this call
boolean org.bukkit.inventory.meta.PotionMeta.setMainEffect ( PotionEffectType  type)

Moves a potion effect to the top of the potion effect list.

This causes the client to display the potion effect in the potion's name.

Parameters
typethe potion effect type to move
Returns
true if the potion meta changed as a result of this call

The documentation for this interface was generated from the following file: