Contents
Class EventRegistration<KeyType, EventType extends IBaseEvent<KeyType>>
java.lang.Object
com.hypixel.hytale.registry.Registration
com.hypixel.hytale.event.EventRegistration<KeyType, EventType>
- Type Parameters:
KeyType- The key type filter for this event call.EventType- The event type.
An event registration that can be unregistered.
-
Constructor Summary
ConstructorsConstructorDescriptionEventRegistration(EventRegistration<KeyType, EventType> registration, BooleanSupplier isEnabled, Runnable unregister) Copy Constructor for anEventRegistrationinstance.EventRegistration(Class<EventType> eventClass, BooleanSupplier isEnabled, Runnable unregister) Default Constructor for anEventRegistrationinstance. -
Method Summary
Modifier and TypeMethodDescriptionstatic <KeyType, EventType extends IBaseEvent<KeyType>>
EventRegistration<KeyType, EventType> combine(EventRegistration<KeyType, EventType> thisRegistration, EventRegistration<KeyType, EventType>... containerRegistrations) Called to combine multiple event registrations into one.toString()Methods inherited from class Registration
isRegistered, unregister
-
Constructor Details
-
EventRegistration
public EventRegistration(@Nonnull Class<EventType> eventClass, @Nonnull BooleanSupplier isEnabled, @Nonnull Runnable unregister) Default Constructor for anEventRegistrationinstance.- Parameters:
eventClass- The event class for this registration.isEnabled- The enabled condition for this registration.unregister- The unregister action for this registration.
-
EventRegistration
public EventRegistration(@Nonnull EventRegistration<KeyType, EventType> registration, @Nonnull BooleanSupplier isEnabled, @Nonnull Runnable unregister) Copy Constructor for anEventRegistrationinstance.- Parameters:
registration- The registration to copy.isEnabled- The enabled condition for this registration.unregister- The unregister action for this registration.
-
-
Method Details
-
getEventClass
-
toString
- Overrides:
toStringin classRegistration
-
combine
@Nonnull @SafeVarargs public static <KeyType, EventType extends IBaseEvent<KeyType>> EventRegistration<KeyType, EventType> combine(@Nonnull EventRegistration<KeyType, EventType> thisRegistration, @Nonnull EventRegistration<KeyType, EventType>... containerRegistrations) Called to combine multiple event registrations into one.- Type Parameters:
KeyType- The key type filter for this event call.EventType- The event type.- Parameters:
thisRegistration- The first event registration.containerRegistrations- The other event registrations.- Returns:
- the combined event registration.
-