Skip to content

Commit

Permalink
use advancement key for command selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
Faithcaio committed Oct 4, 2023
1 parent eb1faca commit cd1da78
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
*/
package org.spongepowered.api.command.selector;

import org.spongepowered.api.ResourceKey;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.advancement.Advancement;
import org.spongepowered.api.advancement.AdvancementTemplate;
import org.spongepowered.api.advancement.criteria.AdvancementCriterion;
import org.spongepowered.api.command.CommandCause;
import org.spongepowered.api.data.persistence.DataView;
Expand Down Expand Up @@ -202,41 +202,41 @@ interface Builder extends org.spongepowered.api.util.Builder<Selector, Builder>
* Adds an {@link Advancement} constraint to this selector, requiring
* that the advancement must be granted to be selected.
*
* @param advancement The advancement that players must have.
* @param advancement The key of the advancement that players must have.
* @return This builder, for chaining
*/
Builder addAdvancement(AdvancementTemplate advancement);
Builder addAdvancement(ResourceKey advancement);

/**
* Adds an {@link Advancement} constraint to this selector, requiring
* that the advancement must NOT be granted to be selected.
*
* @param advancement The advancement that players must not have.
* @param advancement The key of the advancement that players must not have.
* @return This builder, for chaining
*/
Builder addNotAdvancement(AdvancementTemplate advancement);
Builder addNotAdvancement(ResourceKey advancement);

/**
* Adds an {@link AdvancementCriterion} constraint to this selector,
* requiring that the criterion on the given {@link Advancement} must
* be granted to be selected.
*
* @param advancement The advancement
* @param advancement The key of the advancement
* @param criterion The criterion the player must have
* @return This builder, for chaining
*/
Builder addAdvancementCriterion(AdvancementTemplate advancement, AdvancementCriterion criterion);
Builder addAdvancementCriterion(ResourceKey advancement, AdvancementCriterion criterion);

/**
* Adds an {@link AdvancementCriterion} constraint to this selector,
* requiring that the criterion on the given {@link Advancement} must
* not be granted to be selected.
*
* @param advancement The advancement
* @param advancement The key of the advancement
* @param criterion The criterion the player must not have
* @return This builder, for chaining
*/
Builder addNotAdvancementCriterion(AdvancementTemplate advancement, AdvancementCriterion criterion);
Builder addNotAdvancementCriterion(ResourceKey advancement, AdvancementCriterion criterion);

/**
* Adds an {@link DataView} as an NBT style constraint.
Expand Down

0 comments on commit cd1da78

Please sign in to comment.