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 TypeMethodDescriptionvoid
awardAchievementIfNotYetReached(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 AchievementNotifier
get()
singleton accessor methodcom.google.common.collect.ImmutableList<Achievement>
gets a list of all Achievementsvoid
initializes the achievements that are available and registers the login listener new added achievements are added to the achievements tableboolean
Checks if the achievement list has already been populated.void
check all achievements for a player that belong to the age categoryvoid
onAtkChange(Player player)
void
onDefChange(Player player)
void
onFinishDeathmatch(Player player)
check all achievements for a player that are related to deathmatchvoid
onFinishQuest(Player player)
check all achievements for a player that are relevant on finishing a questvoid
onItemLoot(Player player)
check all achievements for a player that belong to the item categoryvoid
checks all achievements for a player that should be checked when a player kills sthvoid
onLevelChange(Player player)
checks all for level change relevant achievements for a playervoid
Checks on login of a player which achievements the player has reached and gives a summarizing messagevoid
Check all achievements for a player that belong to the obtain category.void
onProduction(Player player)
check all achievements for a player that belong to the production categoryvoid
onRatkChange(Player player)
void
Check all achievements for player that beling to the commerce category.void
onZoneEnter(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
-