diff --git a/res/plugin.yml b/res/plugin.yml index b06377e..98ed3fc 100755 --- a/res/plugin.yml +++ b/res/plugin.yml @@ -1,6 +1,6 @@ name: RedLib main: redempt.redlib.RedLib -version: 2022-09-16 03:17 +version: 2022-09-16 05:12 author: Redempt api-version: 1.13 load: STARTUP diff --git a/src/redempt/redlib/misc/EventListener.java b/src/redempt/redlib/misc/EventListener.java index a861308..068f0ed 100644 --- a/src/redempt/redlib/misc/EventListener.java +++ b/src/redempt/redlib/misc/EventListener.java @@ -109,7 +109,9 @@ public EventListener(Plugin plugin, Class eventClass, Consumer handler) { @EventHandler public void handleEvent(T event) { - handler.accept(this, event); + if (eventClass.isAssignableFrom(event.getClass())) { + handler.accept(this, event); + } } /**