diff --git a/apis/base-api/src/main/kotlin/dev/redicloud/api/utils/CloudJKWrapper.kt b/apis/base-api/src/main/kotlin/dev/redicloud/api/utils/CloudJKWrapper.kt index 0ba8ded9..412a1a25 100644 --- a/apis/base-api/src/main/kotlin/dev/redicloud/api/utils/CloudJKWrapper.kt +++ b/apis/base-api/src/main/kotlin/dev/redicloud/api/utils/CloudJKWrapper.kt @@ -4,8 +4,8 @@ class CloudJKWrapper { companion object { @JvmStatic - fun injectCloudAPI(clazz: Class, cloudInjectable: CloudInjectable) { - injectCloudAPI(clazz, cloudInjectable) + fun injectCloudAPI(clazz: Class, cloudInjectable: T) { + injectApi(clazz, cloudInjectable) } @JvmStatic diff --git a/apis/base-api/src/main/kotlin/dev/redicloud/api/utils/InjectorUtils.kt b/apis/base-api/src/main/kotlin/dev/redicloud/api/utils/InjectorUtils.kt index 6159e606..ce76a802 100644 --- a/apis/base-api/src/main/kotlin/dev/redicloud/api/utils/InjectorUtils.kt +++ b/apis/base-api/src/main/kotlin/dev/redicloud/api/utils/InjectorUtils.kt @@ -5,10 +5,10 @@ import com.google.inject.Injector lateinit var injector: Injector inline fun T.injectCloudApi() { - injectCloudApi(T::class.java, this) + injectApi(T::class.java, this) } -fun injectCloudApi(clazz: Class, instance: T) { +fun injectApi(clazz: Class, instance: T) { val membersInjector = injector.getMembersInjector(clazz) membersInjector.injectMembers(instance) }