bukkit
Manipulera prestationer
Sök…
Syntax
- player.awardAchievement (Achievement ach);
Tilldelning av prestationer
Player player; //The player you want to award your achievement with
Achievement achievement; //The achievement you want to award your player
player.awardAchievement(achievement); //Awarding the achievement
Kontrollera om spelaren har prestation:
Player player;
Achievement achievement;
boolean hasAchievement = player.hasAchievement(achievement);
Koden tilldelar prestationen och alla föräldraprestationer.
Möjliga resultat är:
- ACQUIRE_IRON (förvärva hårdvara)
- BAKE_CAKE (The Lie)
- BOOKCASE (bibliotekarie)
- BREED_COW (Repopulation)
- BREW_POTION (lokalt bryggeri)
- BUILD_BETTER_PICKAXE (Få en uppgradering)
- BUILD_FURNACE (hett ämne)
- BUILD_HOE (Time to Farm!)
- BUILD_PICKAXE (Time to Mine!)
- BUILD_SWORD (Time to Strike!)
- BUILD_WORKBENCH (benchmarking)
- COOK_FISH (Delicious Fish)
- DIAMONDS_TO_YOU (diamanter till dig!)
- ENCHANTMENTS (Enchanter)
- END_PORTAL (Slutet?)
- EXPLORE_ALL_BIOMES (Adventuring Time)
- FLY_PIG (When Pigs Fly)
- FULL_BEACON (Beaconator)
- GET_BLAZE_ROD (In Fire)
- GET_DIAMONDS (DIAMONDS!)
- GHAST_RETURN (Återgå till avsändare)
- KILL_COW (tippvagn)
- KILL_ENEMY (Monster Hunter)
- KILL_WITHER (början.)
- MAKE_BREAD (baka bröd)
- MINE_WOOD (Getting Wood)
- NETHER_PORTAL (vi måste gå djupare)
- ON_A_RAIL (On A Rail)
- OPEN_INVENTORY (tar inventering)
- OVERKILL (Overkill)
- ÖVERKOMMANDE (övermannad)
- SNIPE_SKELETON (Sniper Duel)
- SPAWN_WITHER (Början?)
- THE_END (The End.)
Modified text is an extract of the original Stack Overflow Documentation
Licensierat under CC BY-SA 3.0
Inte anslutet till Stack Overflow