mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-13 14:50:43 +08:00
Add ReplaceWith
This commit is contained in:
parent
9e77b7b7c5
commit
46d490df7b
@ -103,7 +103,7 @@ object MiraiConsole {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关闭Console
|
* 关闭 Console
|
||||||
*/
|
*/
|
||||||
fun stop() {
|
fun stop() {
|
||||||
PluginManager.disablePlugins()
|
PluginManager.disablePlugins()
|
||||||
@ -118,7 +118,14 @@ object MiraiConsole {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("RedundantSuspendModifier") // binary compatibility
|
@Suppress("RedundantSuspendModifier") // binary compatibility
|
||||||
@Deprecated("Please use CommandManager directly, this will be removed in later release")
|
@Deprecated(
|
||||||
|
"Please use CommandManager directly, this will be removed in later release",
|
||||||
|
ReplaceWith(
|
||||||
|
"CommandManager",
|
||||||
|
"net.mamoe.mirai.console.command.CommandManager"
|
||||||
|
),
|
||||||
|
level = DeprecationLevel.ERROR
|
||||||
|
)
|
||||||
object CommandProcessor {
|
object CommandProcessor {
|
||||||
@Deprecated(
|
@Deprecated(
|
||||||
"Please use CommandManager directly, this will be removed in later release", ReplaceWith(
|
"Please use CommandManager directly, this will be removed in later release", ReplaceWith(
|
||||||
@ -156,7 +163,7 @@ object MiraiConsole {
|
|||||||
"Please use CommandManager directly, this will be removed in later release", ReplaceWith(
|
"Please use CommandManager directly, this will be removed in later release", ReplaceWith(
|
||||||
"CommandManager.runCommand(sender, command)",
|
"CommandManager.runCommand(sender, command)",
|
||||||
"net.mamoe.mirai.console.command.CommandManager"
|
"net.mamoe.mirai.console.command.CommandManager"
|
||||||
)
|
), level = DeprecationLevel.ERROR
|
||||||
)
|
)
|
||||||
fun runCommandBlocking(sender: CommandSender, command: String) = runBlocking {
|
fun runCommandBlocking(sender: CommandSender, command: String) = runBlocking {
|
||||||
CommandManager.runCommand(sender, command)
|
CommandManager.runCommand(sender, command)
|
||||||
|
Loading…
Reference in New Issue
Block a user