Interface AchievementsManager


  • public interface AchievementsManager
    AchievementsManager manages achievements.
    • Method Detail

      • 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.
      • getAchieved

        List<String> getAchieved()
        Returns the ids of all achievements already granted.