Remove unnecessary elvis operator
This commit is contained in:
parent
be61809a7b
commit
c64538e7b0
|
@ -44,7 +44,7 @@ object ForgelinAutomaticEventSubscriber {
|
||||||
LOGGER.debug("Registering @EventBusSubscriber object for {} for mod {}", subscriber.className, mod.modId)
|
LOGGER.debug("Registering @EventBusSubscriber object for {} for mod {}", subscriber.className, mod.modId)
|
||||||
|
|
||||||
val subscriberClass = Class.forName(subscriber.className, false, loader) ?: continue
|
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
|
val subscriberInstance = kotlinClass.objectInstance ?: kotlinClass.companionObjectInstance ?: continue
|
||||||
|
|
||||||
MinecraftForge.EVENT_BUS.unregister(subscriberClass)
|
MinecraftForge.EVENT_BUS.unregister(subscriberClass)
|
||||||
|
|
Loading…
Reference in New Issue