diff --git a/src/main/java/emu/grasscutter/server/event/EventHandler.java b/src/main/java/emu/grasscutter/server/event/EventHandler.java index be6b1c452..6611b758c 100644 --- a/src/main/java/emu/grasscutter/server/event/EventHandler.java +++ b/src/main/java/emu/grasscutter/server/event/EventHandler.java @@ -3,17 +3,14 @@ package emu.grasscutter.server.event; import emu.grasscutter.Grasscutter; import emu.grasscutter.utils.EventConsumer; -import java.lang.reflect.ParameterizedType; - public final class EventHandler { private final Class eventClass; private EventConsumer listener; private HandlerPriority priority; private boolean handleCanceled; - @SuppressWarnings("unchecked") - public EventHandler() { - this.eventClass = (Class) ((ParameterizedType) (getClass().getGenericSuperclass())).getActualTypeArguments()[0]; + public EventHandler(Class eventClass) { + this.eventClass = eventClass; } /**