diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/description/PluginDependency.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/description/PluginDependency.kt index 957a14bf7..e62ba0482 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/description/PluginDependency.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/description/PluginDependency.kt @@ -36,6 +36,14 @@ public data class PluginDependency @JvmOverloads constructor( */ public val isOptional: Boolean = false ) { + init { + kotlin.runCatching { + PluginDescription.checkPluginId(id) + }.getOrElse { + throw IllegalArgumentException(it) + } + } + /** * @see PluginDependency */