Last active
February 7, 2017 02:45
-
-
Save simolus3/d6c1df6352567f63abbc to your computer and use it in GitHub Desktop.
English Name of Bukkit API Achievements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.HashMap; | |
import org.bukkit.Achievement; | |
public class AchievementName { | |
private static HashMap<Achievement, String> names = new HashMap<Achievement, String>(); | |
static { | |
names.put(Achievement.OPEN_INVENTORY, "Taking inventory"); | |
names.put(Achievement.MINE_WOOD, "Getting Wood"); | |
names.put(Achievement.BUILD_WORKBENCH, "Benchmarking"); | |
names.put(Achievement.BUILD_PICKAXE, "Time to Mine!"); | |
names.put(Achievement.BUILD_FURNACE, "Hot Topic"); | |
names.put(Achievement.ACQUIRE_IRON, "Acquire Hardware!"); | |
names.put(Achievement.BUILD_HOE, "Time to Farm!"); | |
names.put(Achievement.MAKE_BREAD, "Bake Bread"); | |
names.put(Achievement.BAKE_CAKE, "The Lie"); | |
names.put(Achievement.BUILD_BETTER_PICKAXE, "Getting an Upgrade"); | |
names.put(Achievement.COOK_FISH, "Delicious Fish"); | |
names.put(Achievement.ON_A_RAIL, "On A Rail"); | |
names.put(Achievement.BUILD_SWORD, "Time to Strike"); | |
names.put(Achievement.KILL_ENEMY, "Monster Hunter"); | |
names.put(Achievement.KILL_COW, "Cow Tipper"); | |
names.put(Achievement.FLY_PIG, "When Pigs Fly!"); | |
names.put(Achievement.SNIPE_SKELETON, "Sniper Duel"); | |
names.put(Achievement.GET_DIAMONDS, "DIAMONDS!"); | |
names.put(Achievement.NETHER_PORTAL, "We Need to Go Deeper"); | |
names.put(Achievement.GHAST_RETURN, "Return to Sender"); | |
names.put(Achievement.GET_BLAZE_ROD, "Into Fire"); | |
names.put(Achievement.BREW_POTION, "Local Brewery"); | |
names.put(Achievement.END_PORTAL, "The End?"); | |
names.put(Achievement.THE_END, "The End."); | |
names.put(Achievement.ENCHANTMENTS, "Enchanter"); | |
names.put(Achievement.OVERKILL, "Overkill"); | |
names.put(Achievement.BOOKCASE, "Librarian"); | |
names.put(Achievement.EXPLORE_ALL_BIOMES, "Adventuring Time"); | |
names.put(Achievement.SPAWN_WITHER, "The Beginning?"); | |
names.put(Achievement.KILL_WITHER, "The Beginning."); | |
names.put(Achievement.FULL_BEACON, "Beaconator"); | |
names.put(Achievement.BREED_COW, "Repopulation"); | |
names.put(Achievement.DIAMONDS_TO_YOU, "Diamonds to you!"); | |
names.put(Achievement.OVERPOWERED, "Overpowered"); | |
} | |
public static String getName(Achievement a) { | |
if (a == null) | |
throw new IllegalArgumentException("The achievement cannot be null!"); | |
String name = names.get(a); | |
if (name == null) { | |
name = a.toString().replace('_', ' ').toLowerCase(); | |
} | |
return name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment