Interface AchievementsManager
-
public interface AchievementsManager
AchievementsManager manages achievements.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clientAchieved(String id)
Grant an achievement on client side to get it persisted in the client state and on integrations.List<String>
getAchieved()
Returns the ids of all achievements already granted.AchievementDef
getAchievementDef(String id)
Returns the definition of a specific achievementAchievementsDef
getAchievementsDef()
Returns the definition of achievements (loaded from mod folders)void
load(AchievementsDef achievementsDef)
void
load(String modName, InputStream in)
void
reset()
void
serverAchieved(String id, GameSession gameSession)
This is the main method to grant an achievement to a player.void
serverAchieved(String id, Set<UUID> sessions, GameSession gameSession)
This is the main method to grant an achievement to multiple players at once (e.g.
-
-
-
Method Detail
-
reset
@RestrictedMethod void reset()
-
load
@RestrictedMethod void load(String modName, InputStream in)
-
load
@RestrictedMethod void load(AchievementsDef achievementsDef)
-
getAchievementsDef
AchievementsDef getAchievementsDef()
Returns the definition of achievements (loaded from mod folders)
-
getAchievementDef
AchievementDef getAchievementDef(String id)
Returns the definition of a specific achievement
-
serverAchieved
void serverAchieved(String id, GameSession gameSession)
This is the main method to grant an achievement to a player.
-
serverAchieved
void serverAchieved(String id, Set<UUID> sessions, GameSession gameSession)
This is the main method to grant an achievement to multiple players at once (e.g. all members of a SpaceShip or a team).
-
clientAchieved
void clientAchieved(String id)
Grant an achievement on client side to get it persisted in the client state and on integrations. Although it is perfectly fine to directly call this, the usual process is to grant achievements on server side and the core AchievementsModule takes care of calling this client side method.
-
-