Skip to content

Commit

Permalink
scoreboard: orCreateScore -> scoreOrCreate
Browse files Browse the repository at this point in the history
  • Loading branch information
kashike committed Mar 21, 2021
1 parent af317e2 commit e5717ac
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ static Builder builder() {
* @param name The name of the {@link Score} to get.
* @return The {@link Score} for te specified {@link Component}, if it exists.
*/
default Optional<Score> score(Component name) {
default Optional<Score> score(final Component name) {
if (!this.hasScore(name)) {
return Optional.empty();
}
return Optional.of(this.orCreateScore(name));
return Optional.of(this.scoreOrCreate(name));
}

/**
Expand All @@ -142,7 +142,7 @@ default Optional<Score> score(Component name) {
* @param name The name of the {@link Score} to get
* @return The {@link Score} for the specified {@link Component}
*/
Score orCreateScore(Component name);
Score scoreOrCreate(Component name);

/**
* Removes the specified {@link Score} from this objective, if present.
Expand Down Expand Up @@ -196,7 +196,7 @@ interface Builder extends org.spongepowered.api.util.Builder<Objective, Builder>
* @param criterion The {@link Criterion} to set
* @return This builder
*/
default Builder criterion(Supplier<? extends Criterion> criterion) {
default Builder criterion(final Supplier<? extends Criterion> criterion) {
return this.criterion(criterion.get());
}

Expand All @@ -214,7 +214,7 @@ default Builder criterion(Supplier<? extends Criterion> criterion) {
* @param objectiveDisplayMode The {@link ObjectiveDisplayMode} to set
* @return This builder
*/
default Builder objectiveDisplayMode(Supplier<? extends ObjectiveDisplayMode> objectiveDisplayMode) {
default Builder objectiveDisplayMode(final Supplier<? extends ObjectiveDisplayMode> objectiveDisplayMode) {
return this.objectiveDisplayMode(objectiveDisplayMode.get());
}

Expand All @@ -232,6 +232,7 @@ default Builder objectiveDisplayMode(Supplier<? extends ObjectiveDisplayMode> ob
* @return A new instance of an {@link Objective}
* @throws IllegalStateException if the {@link Objective} is not complete
*/
@Override
Objective build() throws IllegalStateException;

}
Expand Down

0 comments on commit e5717ac

Please sign in to comment.