Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Commit

Permalink
fix: conflict with luckperms #11
Browse files Browse the repository at this point in the history
  • Loading branch information
Itsusinn committed Aug 29, 2023
1 parent f9d3b5b commit 9284adc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main/kotlin/Plugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,14 @@ object Plugin : KotlinPlugin(
runCatching {
service.cancel(AbstractPermitteeId.AnyUser, Plugin.parentPermission, true)
}
if (Config.perm.strict) {
Logger.info { "信使的严格模式已开启, 信使仅对名单内用户指令作出响应" }
if (
PluginManager.plugins.find {
it.id == "io.github.karlatemp.luckperms-mirai"
} != null
) {
Logger.info { "检测到LuckPerms-Mirai, 信使不再管理自身权限." }
} else if (Config.perm.strict) {
Logger.info { "信使的严格模式已开启, 信使仅对名单内用户指令作出响应." }
Config.perm.users.forEach { user ->
service.permit(AbstractPermitteeId.parseFromString("u$user"), Plugin.parentPermission)
}
Expand Down

0 comments on commit 9284adc

Please sign in to comment.