mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-11 02:50:15 +08:00
Add fake constructor for JvmPluginDescription
This commit is contained in:
parent
4fd379cfec
commit
9add8f71ef
@ -48,4 +48,41 @@ public data class SimpleJvmPluginDescription
|
|||||||
init {
|
init {
|
||||||
require(!name.contains(':')) { "':' is forbidden in plugin name" }
|
require(!name.contains(':')) { "':' is forbidden in plugin name" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@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<PluginDependency> = 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<PluginDependency> = listOf(),
|
||||||
|
kind: PluginKind = PluginKind.NORMAL
|
||||||
|
): JvmPluginDescription = SimpleJvmPluginDescription(name, version, author, info, dependencies, kind)
|
||||||
|
Loading…
Reference in New Issue
Block a user