org.bukkit.potion
Enum PotionType

java.lang.Object
  extended by java.lang.Enum<PotionType>
      extended by org.bukkit.potion.PotionType
All Implemented Interfaces:
Serializable, Comparable<PotionType>

public enum PotionType
extends Enum<PotionType>


Enum Constant Summary
FIRE_RESISTANCE
           
INSTANT_DAMAGE
           
INSTANT_HEAL
           
INVISIBILITY
           
NIGHT_VISION
           
POISON
           
REGEN
           
SLOWNESS
           
SPEED
           
STRENGTH
           
WATER
           
WEAKNESS
           
 
Method Summary
static PotionType getByDamageValue(int damage)
           
static PotionType getByEffect(PotionEffectType effectType)
           
 int getDamageValue()
           
 PotionEffectType getEffectType()
           
 int getMaxLevel()
           
 boolean isInstant()
           
static PotionType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static PotionType[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

WATER

public static final PotionType WATER

REGEN

public static final PotionType REGEN

SPEED

public static final PotionType SPEED

FIRE_RESISTANCE

public static final PotionType FIRE_RESISTANCE

POISON

public static final PotionType POISON

INSTANT_HEAL

public static final PotionType INSTANT_HEAL

NIGHT_VISION

public static final PotionType NIGHT_VISION

WEAKNESS

public static final PotionType WEAKNESS

STRENGTH

public static final PotionType STRENGTH

SLOWNESS

public static final PotionType SLOWNESS

INSTANT_DAMAGE

public static final PotionType INSTANT_DAMAGE

INVISIBILITY

public static final PotionType INVISIBILITY
Method Detail

values

public static final PotionType[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(PotionType c : PotionType.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static PotionType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

getEffectType

public PotionEffectType getEffectType()

getDamageValue

public int getDamageValue()

getMaxLevel

public int getMaxLevel()

isInstant

public boolean isInstant()

getByDamageValue

public static PotionType getByDamageValue(int damage)

getByEffect

public static PotionType getByEffect(PotionEffectType effectType)


Copyright © 2013. All Rights Reserved.