Class EventHandler<T extends GeyserEvent>
java.lang.Object
org.geysermc.geyser.event.handlers.EventHandler<T>
- All Implemented Interfaces:
Comparable<EventHandler<T>>
,Comparator<EventHandler<T>>
- Direct Known Subclasses:
LambdaEventHandler
,MethodEventHandler
public abstract class EventHandler<T extends GeyserEvent>
extends Object
implements Comparable<EventHandler<T>>, Comparator<EventHandler<T>>
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compare(EventHandler<T> left, EventHandler<T> right)
int
compareTo(EventHandler<T> other)
abstract void
Execute a handler for an eventabstract int
Return our priorityvoid
Unregister ourselfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
EventHandler
-
-
Method Details
-
execute
Execute a handler for an event- Parameters:
event
- Event passed to handler- Throws:
EventHandler.EventHandlerException
- thrown for errors
-
unregister
public void unregister()Unregister ourself -
getPriority
public abstract int getPriority()Return our priority- Returns:
- the priority
-
compareTo
- Specified by:
compareTo
in interfaceComparable<T extends GeyserEvent>
-
compare
- Specified by:
compare
in interfaceComparator<T extends GeyserEvent>
-
getManager
-
getEventClass
-