mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-10 18:40:15 +08:00
Check PluginDependency.id on init
This commit is contained in:
parent
f303b0d21a
commit
807df3bbcd
@ -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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user