Interface Trigger<C extends FilteredTriggerConfiguration>
- Type Parameters:
C
- The configuration type
- All Superinterfaces:
DefaultedRegistryValue
@CatalogedBy(Triggers.class)
public interface Trigger<C extends FilteredTriggerConfiguration>
extends DefaultedRegistryValue
Represents a source that can trigger a
AdvancementCriterion
.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Trigger.Builder<C extends FilteredTriggerConfiguration>
A builder to createTrigger
s. -
Method Summary
Modifier and TypeMethodDescriptionstatic Trigger.Builder
<?> builder()
Creates a newTrigger.Builder
which can be used to create aTrigger
.Gets the type of the usedFilteredTriggerConfiguration
.void
trigger()
void
trigger
(Iterable<ServerPlayer> players) void
trigger
(ServerPlayer player) Methods inherited from interface org.spongepowered.api.registry.DefaultedRegistryValue
asDefaultedReference, findKey, key
-
Method Details
-
builder
Creates a newTrigger.Builder
which can be used to create aTrigger
.- Returns:
- The builder
-
configurationType
Type configurationType()Gets the type of the usedFilteredTriggerConfiguration
.This type represents the
C
type parameter of this instance.- Returns:
- The configuration type
-
trigger
void trigger() -
trigger
- Parameters:
players
- The players to trigger for
-
trigger
- Parameters:
player
- The player to trigger for
-