From 4c0daefd671f216ac1cf3cd0ef6d2f87abbb7ee7 Mon Sep 17 00:00:00 2001 From: Him188 Date: Fri, 18 Sep 2020 23:50:57 +0800 Subject: [PATCH] Replace with static import --- .../kotlin/net/mamoe/mirai/console/command/RawCommand.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/RawCommand.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/RawCommand.kt index 6133e5da2..a924e6982 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/RawCommand.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/RawCommand.kt @@ -15,6 +15,7 @@ import net.mamoe.mirai.console.command.CommandManager.INSTANCE.execute import net.mamoe.mirai.console.command.CommandManager.INSTANCE.executeCommand import net.mamoe.mirai.console.command.java.JRawCommand import net.mamoe.mirai.console.compiler.common.ResolveContext +import net.mamoe.mirai.console.compiler.common.ResolveContext.Kind.COMMAND_NAME import net.mamoe.mirai.console.internal.command.createOrFindCommandPermission import net.mamoe.mirai.console.permission.Permission import net.mamoe.mirai.message.data.MessageChain @@ -37,9 +38,9 @@ public abstract class RawCommand( */ public override val owner: CommandOwner, /** 主指令名. */ - @ResolveContext(ResolveContext.Kind.COMMAND_NAME) public override val primaryName: String, + @ResolveContext(COMMAND_NAME) public override val primaryName: String, /** 次要指令名. */ - @ResolveContext(ResolveContext.Kind.COMMAND_NAME) public override vararg val secondaryNames: String, + @ResolveContext(COMMAND_NAME) public override vararg val secondaryNames: String, /** 用法说明, 用于发送给用户 */ public override val usage: String = "", /** 指令描述, 用于显示在 [BuiltInCommands.HelpCommand] */