From 321aa74a669fe34d7d184eb607323dafd699206b Mon Sep 17 00:00:00 2001 From: Him188 Date: Sat, 24 Oct 2020 21:26:57 +0800 Subject: [PATCH] Mark PluginPermissionIdRequestType as experimental --- .../net/mamoe/mirai/console/permission/PermissionService.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/PermissionService.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/PermissionService.kt index 477afdc26..fcd3ee841 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/PermissionService.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/PermissionService.kt @@ -17,8 +17,8 @@ import net.mamoe.mirai.console.extensions.PermissionServiceProvider import net.mamoe.mirai.console.internal.permission.checkType import net.mamoe.mirai.console.permission.Permission.Companion.parentsWithSelf import net.mamoe.mirai.console.plugin.Plugin -import net.mamoe.mirai.console.plugin.description -import net.mamoe.mirai.console.plugin.name +import net.mamoe.mirai.console.plugin.PluginManager.INSTANCE.description +import net.mamoe.mirai.console.util.ConsoleExperimentalApi import kotlin.reflect.KClass /** @@ -93,6 +93,7 @@ public interface PermissionService

{ ): P /** 为 [Plugin] 分配一个 [PermissionId] */ + @ConsoleExperimentalApi public fun allocatePermissionIdForPlugin( plugin: Plugin, @ResolveContext(COMMAND_NAME) permissionName: String, @@ -127,6 +128,7 @@ public interface PermissionService

{ public fun cancel(permitteeId: PermitteeId, permission: P, recursive: Boolean) /** [Plugin] 尝试分配的 [PermissionId] 来源 */ + @ConsoleExperimentalApi public enum class PluginPermissionIdRequestType { /** For [Plugin.parentPermission] */ PLUGIN_ROOT_PERMISSION,