org.bukkit
Enum Achievement

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

public enum Achievement
extends Enum<Achievement>

Represents an achievement, which may be given to players


Enum Constant Summary
ACQUIRE_IRON
           
BAKE_CAKE
           
BOOKCASE
           
BREW_POTION
           
BUILD_BETTER_PICKAXE
           
BUILD_FURNACE
           
BUILD_HOE
           
BUILD_PICKAXE
           
BUILD_SWORD
           
BUILD_WORKBENCH
           
COOK_FISH
           
ENCHANTMENTS
           
END_PORTAL
           
FLY_PIG
           
GET_BLAZE_ROD
           
GET_DIAMONDS
           
GHAST_RETURN
           
KILL_COW
           
KILL_ENEMY
           
MAKE_BREAD
           
MINE_WOOD
           
NETHER_PORTAL
           
ON_A_RAIL
           
OPEN_INVENTORY
           
OVERKILL
           
SNIPE_SKELETON
           
THE_END
           
 
Field Summary
static int STATISTIC_OFFSET
          The offset used to distinguish Achievements and Statistics
 
Method Summary
static Achievement getById(int id)
          Gets the achievement associated with the given ID.
 int getId()
          Gets the ID for this achievement.
static Achievement valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Achievement[] 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

OPEN_INVENTORY

public static final Achievement OPEN_INVENTORY

MINE_WOOD

public static final Achievement MINE_WOOD

BUILD_WORKBENCH

public static final Achievement BUILD_WORKBENCH

BUILD_PICKAXE

public static final Achievement BUILD_PICKAXE

BUILD_FURNACE

public static final Achievement BUILD_FURNACE

ACQUIRE_IRON

public static final Achievement ACQUIRE_IRON

BUILD_HOE

public static final Achievement BUILD_HOE

MAKE_BREAD

public static final Achievement MAKE_BREAD

BAKE_CAKE

public static final Achievement BAKE_CAKE

BUILD_BETTER_PICKAXE

public static final Achievement BUILD_BETTER_PICKAXE

COOK_FISH

public static final Achievement COOK_FISH

ON_A_RAIL

public static final Achievement ON_A_RAIL

BUILD_SWORD

public static final Achievement BUILD_SWORD

KILL_ENEMY

public static final Achievement KILL_ENEMY

KILL_COW

public static final Achievement KILL_COW

FLY_PIG

public static final Achievement FLY_PIG

SNIPE_SKELETON

public static final Achievement SNIPE_SKELETON

GET_DIAMONDS

public static final Achievement GET_DIAMONDS

NETHER_PORTAL

public static final Achievement NETHER_PORTAL

GHAST_RETURN

public static final Achievement GHAST_RETURN

GET_BLAZE_ROD

public static final Achievement GET_BLAZE_ROD

BREW_POTION

public static final Achievement BREW_POTION

END_PORTAL

public static final Achievement END_PORTAL

THE_END

public static final Achievement THE_END

ENCHANTMENTS

public static final Achievement ENCHANTMENTS

OVERKILL

public static final Achievement OVERKILL

BOOKCASE

public static final Achievement BOOKCASE
Field Detail

STATISTIC_OFFSET

public static final int STATISTIC_OFFSET
The offset used to distinguish Achievements and Statistics

See Also:
Constant Field Values
Method Detail

values

public static final Achievement[] 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(Achievement c : Achievement.values())
        System.out.println(c);

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

valueOf

public static Achievement 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

getId

public int getId()
Gets the ID for this achievement.

Note that this is offset using STATISTIC_OFFSET

Returns:
ID of this achievement

getById

public static Achievement getById(int id)
Gets the achievement associated with the given ID.

Note that the ID must already be offset using STATISTIC_OFFSET

Parameters:
id - ID of the achievement to return
Returns:
Achievement with the given ID


Copyright © 2013. All Rights Reserved.