Interface Objective.Builder
-
- All Superinterfaces:
AbstractBuilder<Objective>
,Buildable.Builder<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 createObjective
instances.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Objective
build()
Builds an instance of anObjective
.default Objective.Builder
criterion(java.util.function.Supplier<? extends Criterion> criterion)
Objective.Builder
criterion(Criterion criterion)
Objective.Builder
displayName(Component displayName)
Sets the display name of theObjective
.Objective.Builder
name(java.lang.String name)
Sets the name of theObjective
.default Objective.Builder
objectiveDisplayMode(java.util.function.Supplier<? extends ObjectiveDisplayMode> objectiveDisplayMode)
Sets theObjectiveDisplayMode
of theObjective
.Objective.Builder
objectiveDisplayMode(ObjectiveDisplayMode objectiveDisplayMode)
Sets theObjectiveDisplayMode
of theObjective
.-
Methods inherited from interface org.spongepowered.api.util.CopyableBuilder
from
-
-
-
-
Method Detail
-
name
Objective.Builder name(java.lang.String name)
Sets the name of theObjective
.- Parameters:
name
- The name to set- Returns:
- This builder
-
displayName
Objective.Builder displayName(Component displayName)
Sets the display name of theObjective
.- Parameters:
displayName
- The display name to set- Returns:
- This builder
-
criterion
default Objective.Builder criterion(java.util.function.Supplier<? extends Criterion> criterion)
- Parameters:
criterion
- TheCriterion
to set- Returns:
- This builder
-
criterion
Objective.Builder criterion(Criterion criterion)
- Parameters:
criterion
- TheCriterion
to set- Returns:
- This builder
-
objectiveDisplayMode
default Objective.Builder objectiveDisplayMode(java.util.function.Supplier<? extends ObjectiveDisplayMode> objectiveDisplayMode)
Sets theObjectiveDisplayMode
of theObjective
.- Parameters:
objectiveDisplayMode
- TheObjectiveDisplayMode
to set- Returns:
- This builder
-
objectiveDisplayMode
Objective.Builder objectiveDisplayMode(ObjectiveDisplayMode objectiveDisplayMode)
Sets theObjectiveDisplayMode
of theObjective
.- Parameters:
objectiveDisplayMode
- TheObjectiveDisplayMode
to set- Returns:
- This builder
-
build
Objective build() throws java.lang.IllegalStateException
Builds an instance of anObjective
.- Specified by:
build
in interfaceAbstractBuilder<Objective>
- Specified by:
build
in interfaceBuildable.Builder<Objective>
- Returns:
- A new instance of an
Objective
- Throws:
java.lang.IllegalStateException
- if theObjective
is not complete
-
-