Package org.skriptlang.skript.util.event
Class EventRegistry<E extends Event>
java.lang.Object
org.skriptlang.skript.util.event.EventRegistry<E>
- Type Parameters:
E
- The class representing the type of events this register will hold.
An EventRegistry is a generic container for events.
They are to be used for providing standardized Event functionality wherever deemed useful.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionevents()
void
Registers the provided event with this register.<T extends E>
voidRegisters the provided event with.void
unregister
(E event) Unregisters the provided event.
-
Constructor Details
-
EventRegistry
public EventRegistry()
-
-
Method Details
-
register
Registers the provided event with this register.- Parameters:
event
- The event to register.
-
register
Registers the provided event with.- Parameters:
eventType
- The type of event being registered. This is useful for registering an event that is aFunctionalInterface
using a lambda.event
- The event to register.
-
unregister
Unregisters the provided event.- Parameters:
event
- The event to unregister.
-
events
- Returns:
- An unmodifiable set of this register's events.
-
events
- Parameters:
type
- The type of events to get.- Returns:
- An unmodifiable subset (of the specified type) of this register's events
-