Skip to content

Commit 45738c6

Browse files
committed
Fix around Spigot
1 parent b996f37 commit 45738c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/kotlin/dev/newspicel/di/events/EventHelper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ object EventHelper {
3131
}
3232

3333
private fun createEventExecutor(plugin: DIJavaPlugin, func: KFunction<*>, eventAnnotation: Event): EventExecutor = EventExecutor { _, event ->
34-
if (!eventAnnotation.event.isInstance(event)) error("Event is not instance of ${eventAnnotation.event} it is instance of ${event::class}, this should never happen!")
34+
if (!eventAnnotation.event.isInstance(event)) return@EventExecutor
3535

3636
val params = plugin.getParameterMap(func.parameters, event)
3737

0 commit comments

Comments
 (0)