mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-25 15:40:28 +08:00
Merge remote-tracking branch 'origin/reborn' into reborn
This commit is contained in:
commit
8ee378cd1b
@ -95,7 +95,7 @@ interface CommandPermission {
|
||||
*/
|
||||
object Console : CommandPermission {
|
||||
override fun CommandSender.hasPermission(): Boolean = false
|
||||
}
|
||||
|
||||
|
||||
object Default : CommandPermission by (Manager or Console)
|
||||
}
|
||||
@ -117,7 +117,6 @@ inline fun CommandSender.hasPermission(permission: CommandPermission): Boolean =
|
||||
|
||||
inline fun CommandPermission.testPermission(sender: CommandSender): Boolean = this.run { sender.hasPermission() }
|
||||
|
||||
|
||||
internal class OrCommandPermission(
|
||||
private val first: CommandPermission,
|
||||
private val second: CommandPermission
|
||||
@ -127,6 +126,7 @@ internal class OrCommandPermission(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
internal class AndCommandPermission(
|
||||
private val first: CommandPermission,
|
||||
private val second: CommandPermission
|
||||
|
Loading…
Reference in New Issue
Block a user