Kotlin for Forge

Kotlin for Forge

70M Downloads

[Question] How are you supposed to use SubscribeEvent in non-mod classes?

filloax opened this issue ยท 0 comments

commented

For instance, let's say I have a ModNetworking class where I want to subscribe to the `RegisterPayloadHandlersEvent' statically, as the class is instanced elsewhere (example: ServiceLoader) so I cannot make it an object.
Do I place @EventBusSubscriber on the class, and @SubscribeEvent on a @JvmStatic method in the companion object?