Skip to content

Commit

Permalink
Remove default permissions from account command
Browse files Browse the repository at this point in the history
  • Loading branch information
memetrollsXD committed Apr 27, 2022
1 parent 65913fc commit 471f5f0
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,10 @@ public void execute(Player sender, List<String> args) {
CommandHandler.sendMessage(null, "Account already exists.");
return;
} else {
CommandHandler.sendMessage(null, "Account created with UID " + account.getPlayerUid() + ".");

for (String permission : Grasscutter.getConfig().getDispatchOptions().defaultPermissions) {
if (!permission.isBlank()) {
account.addPermission(permission);
}
}

account.addPermission('*');
account.save(); // Save account to database.

CommandHandler.sendMessage(null, "Account created with UID " + account.getPlayerUid() + ".");
}
return;
case "delete":
Expand Down

0 comments on commit 471f5f0

Please sign in to comment.