2011-04-21 20:56:19 +01:00
|
|
|
package org.bukkit;
|
|
|
|
|
|
|
|
/**
|
2014-01-14 23:16:04 -05:00
|
|
|
* Represents an achievement, which may be given to players.
|
2011-04-21 20:56:19 +01:00
|
|
|
*/
|
|
|
|
public enum Achievement {
|
2013-11-13 17:53:49 -07:00
|
|
|
OPEN_INVENTORY,
|
2014-01-14 23:16:04 -05:00
|
|
|
MINE_WOOD (OPEN_INVENTORY),
|
|
|
|
BUILD_WORKBENCH (MINE_WOOD),
|
|
|
|
BUILD_PICKAXE (BUILD_WORKBENCH),
|
|
|
|
BUILD_FURNACE (BUILD_PICKAXE),
|
|
|
|
ACQUIRE_IRON (BUILD_FURNACE),
|
|
|
|
BUILD_HOE (BUILD_WORKBENCH),
|
|
|
|
MAKE_BREAD (BUILD_HOE),
|
|
|
|
BAKE_CAKE (BUILD_HOE),
|
|
|
|
BUILD_BETTER_PICKAXE (BUILD_PICKAXE),
|
|
|
|
COOK_FISH (BUILD_FURNACE),
|
|
|
|
ON_A_RAIL (ACQUIRE_IRON),
|
|
|
|
BUILD_SWORD (BUILD_WORKBENCH),
|
|
|
|
KILL_ENEMY (BUILD_SWORD),
|
|
|
|
KILL_COW (BUILD_SWORD),
|
|
|
|
FLY_PIG (KILL_COW),
|
|
|
|
SNIPE_SKELETON (KILL_ENEMY),
|
|
|
|
GET_DIAMONDS (ACQUIRE_IRON),
|
|
|
|
NETHER_PORTAL (GET_DIAMONDS),
|
|
|
|
GHAST_RETURN (NETHER_PORTAL),
|
|
|
|
GET_BLAZE_ROD (NETHER_PORTAL),
|
|
|
|
BREW_POTION (GET_BLAZE_ROD),
|
|
|
|
END_PORTAL (GET_BLAZE_ROD),
|
|
|
|
THE_END (END_PORTAL),
|
|
|
|
ENCHANTMENTS (GET_DIAMONDS),
|
|
|
|
OVERKILL (ENCHANTMENTS),
|
|
|
|
BOOKCASE (ENCHANTMENTS),
|
|
|
|
EXPLORE_ALL_BIOMES (END_PORTAL),
|
|
|
|
SPAWN_WITHER (THE_END),
|
|
|
|
KILL_WITHER (SPAWN_WITHER),
|
|
|
|
FULL_BEACON (KILL_WITHER),
|
|
|
|
BREED_COW (KILL_COW),
|
|
|
|
DIAMONDS_TO_YOU (GET_DIAMONDS),
|
2014-11-26 08:15:59 +11:00
|
|
|
OVERPOWERED (BUILD_BETTER_PICKAXE)
|
2013-11-13 17:53:49 -07:00
|
|
|
;
|
2011-04-21 20:56:19 +01:00
|
|
|
|
2014-01-14 23:16:04 -05:00
|
|
|
private final Achievement parent;
|
|
|
|
|
|
|
|
private Achievement() {
|
|
|
|
parent = null;
|
|
|
|
}
|
|
|
|
|
|
|
|
private Achievement(Achievement parent) {
|
|
|
|
this.parent = parent;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns whether or not this achievement has a parent achievement.
|
|
|
|
*
|
|
|
|
* @return whether the achievement has a parent achievement
|
|
|
|
*/
|
|
|
|
public boolean hasParent() {
|
|
|
|
return parent != null;
|
|
|
|
}
|
|
|
|
|
2011-04-21 20:56:19 +01:00
|
|
|
/**
|
2014-01-14 23:16:04 -05:00
|
|
|
* Returns the parent achievement of this achievement, or null if none.
|
|
|
|
*
|
|
|
|
* @return the parent achievement or null
|
2011-04-21 20:56:19 +01:00
|
|
|
*/
|
2014-01-14 23:16:04 -05:00
|
|
|
public Achievement getParent() {
|
|
|
|
return parent;
|
|
|
|
}
|
2011-04-21 20:56:19 +01:00
|
|
|
}
|