Class AchievementNotifier
java.lang.Object
games.stendhal.server.core.rp.achievement.AchievementNotifier
Checks for reached achievements and marks them as reached for a player if he has fulfilled them
- Author:
- madmetzger
-
Method Summary
Modifier and TypeMethodDescriptionvoidawardAchievementIfNotYetReached(Player player, String achievementIdentifier) Award a player with an achievement that wasn't yet reached by the player (used for example in the wishing well)static AchievementNotifierget()singleton accessor methodcom.google.common.collect.ImmutableList<Achievement>gets a list of all Achievementsvoidinitializes the achievements that are available and registers the login listener new added achievements are added to the achievements tablebooleanChecks if the achievement list has already been populated.voidcheck all achievements for a player that belong to the age categoryvoidonAtkChange(Player player) voidonDefChange(Player player) voidonFinishDeathmatch(Player player) check all achievements for a player that are related to deathmatchvoidonFinishQuest(Player player) check all achievements for a player that are relevant on finishing a questvoidonItemLoot(Player player) check all achievements for a player that belong to the item categoryvoidchecks all achievements for a player that should be checked when a player kills sthvoidonLevelChange(Player player) checks all for level change relevant achievements for a playervoidChecks on login of a player which achievements the player has reached and gives a summarizing messagevoidCheck all achievements for a player that belong to the obtain category.voidonProduction(Player player) check all achievements for a player that belong to the production categoryvoidonRatkChange(Player player) voidCheck all achievements for player that beling to the commerce category.voidonZoneEnter(Player player) check all achievements for a player that belong to the zone category
-
Method Details
-
get
singleton accessor method- Returns:
- the AchievementNotifier
-
initialize
public void initialize()initializes the achievements that are available and registers the login listener new added achievements are added to the achievements table -
isInitialized
public boolean isInitialized()Checks if the achievement list has already been populated. -
onLevelChange
checks all for level change relevant achievements for a player- Parameters:
player-
-
onDefChange
-
onAtkChange
-
onRatkChange
-
onKill
checks all achievements for a player that should be checked when a player kills sth- Parameters:
player-
-
onFinishQuest
check all achievements for a player that are relevant on finishing a quest- Parameters:
player-
-
onFinishDeathmatch
check all achievements for a player that are related to deathmatch- Parameters:
player-
-
onZoneEnter
check all achievements for a player that belong to the zone category- Parameters:
player-
-
onAge
check all achievements for a player that belong to the age category- Parameters:
player-
-
onItemLoot
check all achievements for a player that belong to the item category- Parameters:
player-
-
onProduction
check all achievements for a player that belong to the production category- Parameters:
player-
-
onObtain
Check all achievements for a player that belong to the obtain category.- Parameters:
player-
-
onTrade
Check all achievements for player that beling to the commerce category.- Parameters:
player- Player to check.
-
awardAchievementIfNotYetReached
Award a player with an achievement that wasn't yet reached by the player (used for example in the wishing well)- Parameters:
player- the player object to awardachievementIdentifier- the identifier of the achievement that should be awarded
-
onLogin
Checks on login of a player which achievements the player has reached and gives a summarizing message- Parameters:
player-
-
getAchievements
gets a list of all Achievements- Returns:
- list of achievements
-