diff --git a/out/production/resources/META-INF/services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin b/out/production/resources/META-INF/services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin deleted file mode 100644 index 15abe748..00000000 --- a/out/production/resources/META-INF/services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin +++ /dev/null @@ -1 +0,0 @@ -com.xiaoyv404.mirai.PluginMain \ No newline at end of file diff --git a/out/production/resources/plugin.yml b/out/production/resources/plugin.yml deleted file mode 100644 index 979c3700..00000000 --- a/out/production/resources/plugin.yml +++ /dev/null @@ -1,6 +0,0 @@ -name: "ComprehensivePlugin" -author: "xiaoyv404" -version: "0.3.0" -main: "com.xiaoyv404.ComprehensivePlugin" -info: "A Comprehensive Plugin!" -depends: [ ] \ No newline at end of file diff --git a/src/main/kotlin/com/xiaoyv404/mirai/app/minecraftServer/ISU.kt b/src/main/kotlin/com/xiaoyv404/mirai/app/minecraftServer/ISU.kt index a9c60eba..209db8bf 100644 --- a/src/main/kotlin/com/xiaoyv404/mirai/app/minecraftServer/ISU.kt +++ b/src/main/kotlin/com/xiaoyv404/mirai/app/minecraftServer/ISU.kt @@ -79,9 +79,9 @@ class ISU : NfApp(), IFshApp { } if (more && (MinecraftServerPlayerQQMapping { qq = msg.uid() }.getPermissionByQQ() - ?: Permissions.Default) < Permissions.Basic + ?: Permissions.Default) < Permissions.OP ) { - msg.reply("需要权限至少为妖怪", true) + msg.reply("需要权限至少为${Permissions.OP}", true) return false } @@ -171,7 +171,7 @@ class ISU : NfApp(), IFshApp { private suspend fun findOP(msg: MessageEvent): Boolean { val op = MinecraftServerPlayer().getAllOnlinePlayers().toMutableList() op.removeIf { - it.permissions.code == null + it.permissions == Permissions.Default } if (op.isEmpty()) msg.reply("没有呢 :(") diff --git a/src/main/kotlin/com/xiaoyv404/mirai/model/mincraftServer/MinecraftServerPlayer.kt b/src/main/kotlin/com/xiaoyv404/mirai/model/mincraftServer/MinecraftServerPlayer.kt index c5b13d96..ccdf0ddc 100644 --- a/src/main/kotlin/com/xiaoyv404/mirai/model/mincraftServer/MinecraftServerPlayer.kt +++ b/src/main/kotlin/com/xiaoyv404/mirai/model/mincraftServer/MinecraftServerPlayer.kt @@ -41,12 +41,11 @@ object MinecraftServerPlayers : Table("MinecraftServerPla val permissions = enum("permissions").bindTo { it.permissions } } -enum class Permissions(val code: Long?, val permissionName: String) { - Default(null,"毛玉"), - Basic(5, "妖怪"), - NPCEditor(4, "读心妖怪"), - WorldEditor(3, "工业妖怪"), - WNEditor(2, "大妖怪"), - OP(1, "妖怪贤者"), - Submit(0, "服主"), +enum class Permissions(val permissionName: String) { + Default("毛玉"), + Basic("妖怪"), + NPCEditor("读心妖怪"), + WorldEditor("工业妖怪"), + WNEditor("大妖怪"), + OP("妖怪贤者"), } \ No newline at end of file