C - The configuration typepublic static interface Trigger.Builder<C extends FilteredTriggerConfiguration> extends ResettableBuilder<Trigger<C>,Trigger.Builder<C>>
Triggers.reset<T extends FilteredTriggerConfiguration & DataSerializable> Trigger.Builder<T> dataSerializableConfig(Class<T> dataConfigClass)
FilteredTriggerConfiguration as
a DataSerializable. The configuration will be constructed
using the DataBuilder that is registered for
the DataSerializable.T - The configuration typedataConfigClass - The configuration class<T extends FilteredTriggerConfiguration> Trigger.Builder<T> typeSerializableConfig(Class<T> configClass)
FilteredTriggerConfiguration as
a config serializable. This configuration will be constructed
using Configurate (with TypeSerializers).T - The configuration typeconfigClass - The configuration class<T extends FilteredTriggerConfiguration> Trigger.Builder<T> typeSerializableConfig(Class<T> configClass, TypeSerializerCollection typeSerializerCollection)
FilteredTriggerConfiguration as
a config serializable. This configuration will be constructed using
Configurate (with TypeSerializers) with a
specific TypeSerializerCollection instead of the global one.T - The configuration typeconfigClass - The configuration classtypeSerializerCollection - The type serializer collection<T extends FilteredTriggerConfiguration> Trigger.Builder<T> jsonSerializableConfig(Class<T> configClass, com.google.gson.Gson gson)
FilteredTriggerConfiguration as
a json serializable. This configuration will be constructed using
the provided Gson instance.T - The configuration typeconfigClass - The configuration classgson - The gson instance to use<T extends FilteredTriggerConfiguration> Trigger.Builder<T> jsonSerializableConfig(Class<T> configClass)
FilteredTriggerConfiguration as
a json serializable. This configuration will be constructed using
the default Gson instance.T - The configuration typeconfigClass - The configuration classTrigger.Builder<FilteredTriggerConfiguration.Empty> emptyConfig()
FilteredTriggerConfiguration to use
FilteredTriggerConfiguration.Empty.Trigger.Builder<C> listener(Consumer<CriterionEvent.Trigger<C>> eventListener)
Consumer to handle the triggers. If no handler is
provided then will the result of the trigger always be true,
which results in triggering the Criterion.
The Cause of the event should be used to determine
whether the configuration matches the requirements to trigger
the criterion.
eventListener - The event listenerTrigger.Builder<C> id(String id)
Trigger
(without the namespace).id - The identifierTrigger.Builder<C> name(String name)
Trigger. Defaults
to the identifier (id(String)).name - The name@Deprecated default Trigger.Builder<C> from(Trigger<C> value) throws UnsupportedOperationException
ResettableBuilderfrom in interface ResettableBuilder<Trigger<C extends FilteredTriggerConfiguration>,Trigger.Builder<C extends FilteredTriggerConfiguration>>value - The built objectUnsupportedOperationException