diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginDescription.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginDescription.kt index 66e554c6a..6f9de4245 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginDescription.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginDescription.kt @@ -48,4 +48,41 @@ public data class SimpleJvmPluginDescription init { require(!name.contains(':')) { "':' is forbidden in plugin name" } } -} \ No newline at end of file +} + + +@Deprecated( + "JvmPluginDescription 没有构造器. 请使用 SimpleJvmPluginDescription.", + replaceWith = ReplaceWith( + "SimpleJvmPluginDescription(name, version, author, info, dependencies, kind)", + "net.mamoe.mirai.console.plugin.jvm.SimpleJvmPluginDescription" + ), + level = DeprecationLevel.WARNING +) +@Suppress("FunctionName") +public fun JvmPluginDescription( + name: String, + version: Semver, + author: String = "", + info: String = "", + dependencies: List = listOf(), + kind: PluginKind = PluginKind.NORMAL +): JvmPluginDescription = SimpleJvmPluginDescription(name, version, author, info, dependencies, kind) + +@Deprecated( + "JvmPluginDescription 没有构造器. 请使用 SimpleJvmPluginDescription.", + replaceWith = ReplaceWith( + "SimpleJvmPluginDescription(name, version, author, info, dependencies, kind)", + "net.mamoe.mirai.console.plugin.jvm.SimpleJvmPluginDescription" + ), + level = DeprecationLevel.WARNING +) +@Suppress("FunctionName") +public fun JvmPluginDescription( + name: String, + version: String, + author: String = "", + info: String = "", + dependencies: List = listOf(), + kind: PluginKind = PluginKind.NORMAL +): JvmPluginDescription = SimpleJvmPluginDescription(name, version, author, info, dependencies, kind)