public interface AchievementBuilder
Achievement
s.Modifier and Type | Method and Description |
---|---|
Achievement |
buildAndRegister()
Builds and registers an instance of an
Achievement . |
AchievementBuilder |
description(Translation description)
Sets the description that describes this
Achievement . |
AchievementBuilder |
name(String name)
Sets the internal name for the
Achievement . |
AchievementBuilder |
parent(Achievement parent)
Sets the parent of this
Achievement , if there is one. |
AchievementBuilder |
sourceStatistic(Statistic stat)
Sets a statistic which will be used for tracking this achievement.
|
AchievementBuilder |
targetValue(long value)
Sets the target value of the statistic backing this achievement.
|
AchievementBuilder |
translation(Translation translation)
Sets the translation for the
Achievement . |
AchievementBuilder name(String name)
Achievement
.name
- The name of this achievementAchievementBuilder translation(Translation translation)
Achievement
.translation
- The translation for the achievementAchievementBuilder description(Translation description)
Achievement
.description
- The description of this achievementAchievementBuilder parent(@Nullable Achievement parent)
Achievement
, if there is one.parent
- The parent of this achievementAchievementBuilder sourceStatistic(@Nullable Statistic stat)
targetValue(long)
must be set as well. This defaults to null if
not set.stat
- The statistic, or null if not backed by a statisticAchievementBuilder targetValue(long value)
value
- The target valueAchievement buildAndRegister() throws IllegalStateException
Achievement
.IllegalStateException
- If the achievement is not completed