Skip to content
On this page
Common

KattonDependencyApi

top.katton.apicommon/src/main/kotlin/top/katton/api/KattonDependencyApi.kt
Script-facing access to optional mod and plugin dependency state.

dependencies

dependenciesCommonObject
kotlin
object dependencies

Script-facing access to optional mod and plugin dependency state.

dependencies.isLoaded

dependencies.isLoadedCommonFunction
kotlin
fun isLoaded(id: String): Boolean

Returns whether the current platform dependency is installed and enabled.

dependencies.version

dependencies.versionCommonFunction
kotlin
fun version(id: String): String?

Returns the installed dependency version, or null when the dependency is unavailable.

dependencies.require

dependencies.requireCommonFunction
kotlin
fun require(id: String)

Returns the installed and enabled dependency.

Throws

ExceptionDescription
IllegalStateExceptionwhen the dependency is not installed or enabled