Skip to content

Commit

Permalink
更新MCG权限价格
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyv404 committed Dec 22, 2023
1 parent 204ba8b commit 1ad0d20
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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("没有呢 :(")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,11 @@ object MinecraftServerPlayers : Table<MinecraftServerPlayer>("MinecraftServerPla
val permissions = enum<Permissions>("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("妖怪贤者"),
}

0 comments on commit 1ad0d20

Please sign in to comment.