diff --git a/src/main/kotlin/net/shadowfacts/forgelin/ForgelinAutomaticEventSubscriber.kt b/src/main/kotlin/net/shadowfacts/forgelin/ForgelinAutomaticEventSubscriber.kt index dfef1f1..be1847e 100644 --- a/src/main/kotlin/net/shadowfacts/forgelin/ForgelinAutomaticEventSubscriber.kt +++ b/src/main/kotlin/net/shadowfacts/forgelin/ForgelinAutomaticEventSubscriber.kt @@ -44,7 +44,7 @@ object ForgelinAutomaticEventSubscriber { LOGGER.debug("Registering @EventBusSubscriber object for {} for mod {}", subscriber.className, mod.modId) val subscriberClass = Class.forName(subscriber.className, false, loader) ?: continue - val kotlinClass = subscriberClass?.kotlin ?: continue + val kotlinClass = subscriberClass.kotlin val subscriberInstance = kotlinClass.objectInstance ?: kotlinClass.companionObjectInstance ?: continue MinecraftForge.EVENT_BUS.unregister(subscriberClass)