From cd1da78b41d962bef0e638504a446f778fc2ba7b Mon Sep 17 00:00:00 2001 From: Anselm Brehme Date: Wed, 4 Oct 2023 16:55:46 +0200 Subject: [PATCH] use advancement key for command selectors --- .../api/command/selector/Selector.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/spongepowered/api/command/selector/Selector.java b/src/main/java/org/spongepowered/api/command/selector/Selector.java index e00251ca20..352d4ba285 100644 --- a/src/main/java/org/spongepowered/api/command/selector/Selector.java +++ b/src/main/java/org/spongepowered/api/command/selector/Selector.java @@ -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; @@ -202,41 +202,41 @@ interface Builder extends org.spongepowered.api.util.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.