Interface AchievementsManager
-
public interface AchievementsManagerAchievementsManager manages achievements.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclientAchieved(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.AchievementDefgetAchievementDef(String id)Returns the definition of a specific achievementAchievementsDefgetAchievementsDef()Returns the definition of achievements (loaded from mod folders)voidload(AchievementsDef achievementsDef)voidload(String modName, InputStream in)voidreset()voidserverAchieved(String id, GameSession gameSession)This is the main method to grant an achievement to a player.voidserverAchieved(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.
-
-