Interface Trigger<C extends FilteredTriggerConfiguration>
-
- Type Parameters:
C
- The configuration type
- All Superinterfaces:
DefaultedRegistryValue
,Keyed
,ResourceKeyed
@CatalogedBy(Triggers.class) public interface Trigger<C extends FilteredTriggerConfiguration> extends DefaultedRegistryValue, ResourceKeyed
Represents a source that can trigger aAdvancementCriterion
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Trigger.Builder<C extends FilteredTriggerConfiguration>
A builder to createTrigger
s.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static Trigger.Builder<?>
builder()
Creates a newTrigger.Builder
which can be used to create aTrigger
.Type
configurationType()
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
-
Methods inherited from interface org.spongepowered.api.ResourceKeyed
key
-
-
-
-
Method Detail
-
builder
static Trigger.Builder<?> 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
void trigger(Iterable<ServerPlayer> players)
- Parameters:
players
- The players to trigger for
-
trigger
void trigger(ServerPlayer player)
- Parameters:
player
- The player to trigger for
-
-