Interface Objective.Builder
- All Superinterfaces:
AbstractBuilder<Objective>
,Builder<Objective,
,Objective.Builder> CopyableBuilder<Objective,
,Objective.Builder> ResettableBuilder<Objective,
Objective.Builder>
- Enclosing interface:
Objective
public static interface Objective.Builder
extends Builder<Objective,Objective.Builder>, CopyableBuilder<Objective,Objective.Builder>
Represents a builder to create
Objective
instances.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds an instance of anObjective
.default Objective.Builder
displayName
(Component displayName) Sets the display name of theObjective
.Sets the name of theObjective
.default Objective.Builder
objectiveDisplayMode
(Supplier<? extends ObjectiveDisplayMode> objectiveDisplayMode) Sets theObjectiveDisplayMode
of theObjective
.objectiveDisplayMode
(ObjectiveDisplayMode objectiveDisplayMode) Sets theObjectiveDisplayMode
of theObjective
.Methods inherited from interface org.spongepowered.api.util.CopyableBuilder
from
-
Method Details
-
name
Sets the name of theObjective
.- Parameters:
name
- The name to set- Returns:
- This builder
-
displayName
Sets the display name of theObjective
.- Parameters:
displayName
- The display name to set- Returns:
- This builder
-
criterion
- Parameters:
criterion
- TheCriterion
to set- Returns:
- This builder
-
criterion
- Parameters:
criterion
- TheCriterion
to set- Returns:
- This builder
-
objectiveDisplayMode
default Objective.Builder objectiveDisplayMode(Supplier<? extends ObjectiveDisplayMode> objectiveDisplayMode) Sets theObjectiveDisplayMode
of theObjective
.- Parameters:
objectiveDisplayMode
- TheObjectiveDisplayMode
to set- Returns:
- This builder
-
objectiveDisplayMode
Sets theObjectiveDisplayMode
of theObjective
.- Parameters:
objectiveDisplayMode
- TheObjectiveDisplayMode
to set- Returns:
- This builder
-
build
Builds an instance of anObjective
.- Specified by:
build
in interfaceAbstractBuilder<Objective>
- Returns:
- A new instance of an
Objective
- Throws:
IllegalStateException
- if theObjective
is not complete
-