Skip to content

Commit

Permalink
fix permission problem
Browse files Browse the repository at this point in the history
  • Loading branch information
NONPLAYT committed Sep 28, 2024
1 parent 22be4ec commit 2e434a0
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,12 @@ public void execute() {
break;
case PERMISSION:
String[] permParts = coloredLine.split(" ", 2);
if (permParts.length == 2 && player.hasPermission(permParts[0])) {
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), permParts[1].replace("<player>", player.getName()));
if (permParts.length == 2) {
String permission = permParts[0].replace("{", "").replace("}", "");

if (player.hasPermission(permission)) {
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), permParts[1].replace("<player>", player.getName()));
}
}
break;
case LUCK:
Expand Down

0 comments on commit 2e434a0

Please sign in to comment.