Skip to content

Commit

Permalink
Fix can't open all_dominion menu even player has 'dominion.admin' per…
Browse files Browse the repository at this point in the history
…mission node. #39
  • Loading branch information
ColdeZhang committed Nov 28, 2024
1 parent 4173dd6 commit f1f0325
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var libraries = listOf<String>()
libraries = libraries + "cn.lunadeer:MinecraftPluginUtils:2.0.7"

group = "cn.lunadeer"
version = "2.14.6-beta"
version = "2.14.7-beta"

java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/cn/lunadeer/dominion/uis/tuis/Menu.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public static void show(CommandSender sender, String[] args) {
if (Dominion.config.getResidenceMigration()) {
view.add(migrate);
}
if (player.isOp()) {
if (player.hasPermission("dominion.admin")) {
view.add(Line.create().append(""));
view.add(Line.create().append(Component.text(Translation.TUI_Menu_OpOnlySection.trans(), ViewStyles.main_color)));
view.add(all);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static boolean noAuthToManage(Player player, DominionDTO dominion) {
}

public static boolean notOp(CommandSender sender) {
if (!sender.isOp()) {
if (!sender.hasPermission("dominion.admin")) {
Notification.error(sender, Translation.Messages_PageNoPermission);
return true;
}
Expand Down

0 comments on commit f1f0325

Please sign in to comment.