Skip to content

Commit

Permalink
判断时添加权限节点前缀
Browse files Browse the repository at this point in the history
  • Loading branch information
CarmJos committed Dec 17, 2021
1 parent dcc692c commit c888846
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ public int getMaxHome(Player player) {
Map<String, Integer> permissions = PluginConfig.PERMISSIONS.get();
int value = PluginConfig.DEFAULT_HOME.get();
for (Map.Entry<String, Integer> entry : permissions.entrySet()) {
if (entry.getValue() > value && player.hasPermission(entry.getKey())) {
if (entry.getValue() > value && player.hasPermission(
Main.getInstance().getName() + "." + entry.getKey()
)) {
value = entry.getValue();
}
}
Expand Down

0 comments on commit c888846

Please sign in to comment.