From 2d605487af8d21412dcfc801bef33934206b1ce1 Mon Sep 17 00:00:00 2001 From: Redempt Date: Thu, 15 Sep 2022 23:17:28 -0400 Subject: [PATCH] Fix EventListener not being able to listen to EntitySpawnEvent --- res/plugin.yml | 2 +- src/redempt/redlib/misc/EventListener.java | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/res/plugin.yml b/res/plugin.yml index 9d7bf40..b06377e 100755 --- a/res/plugin.yml +++ b/res/plugin.yml @@ -1,6 +1,6 @@ name: RedLib main: redempt.redlib.RedLib -version: 2022-09-04 18:38 +version: 2022-09-16 03:17 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 783ed30..a861308 100644 --- a/src/redempt/redlib/misc/EventListener.java +++ b/src/redempt/redlib/misc/EventListener.java @@ -109,9 +109,7 @@ public EventListener(Plugin plugin, Class eventClass, Consumer handler) { @EventHandler public void handleEvent(T event) { - if (event.getClass().equals(eventClass)) { - handler.accept(this, event); - } + handler.accept(this, event); } /**