Interface EventRegistration
public interface EventRegistration
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T extends Event>
voidregisterEvent
(Class<T> eventClass, Consumer<T> onPacket) Registers an event.<T extends Event>
voidregisterEvent
(Class<T> eventClass, Consumer<T> onPacket, int priority) Registers an event.
-
Method Details
-
registerEvent
Registers an event.- Type Parameters:
T
- the event type- Parameters:
eventClass
- the class of the event you want to receiveonPacket
- the consumer that is called when the event was dispatchedpriority
- the event priority - Higher values mean a higher priority
-
registerEvent
Registers an event.- Type Parameters:
T
- the event type- Parameters:
eventClass
- the class of the event you want to receiveonPacket
- the consumer that is called when the event was dispatched
-