kotlin
object dependenciesScript-facing access to optional mod and plugin dependency state.
dependencies.isLoaded
kotlin
fun isLoaded(id: String): BooleanReturns whether the current platform dependency is installed and enabled.
dependencies.version
kotlin
fun version(id: String): String?Returns the installed dependency version, or null when the dependency is unavailable.
dependencies.require
kotlin
fun require(id: String)Returns the installed and enabled dependency.
异常
| 异常 | 说明 |
|---|---|
IllegalStateException | when the dependency is not installed or enabled |
