diff --git a/src/main/java/emu/grasscutter/command/CommandMap.java b/src/main/java/emu/grasscutter/command/CommandMap.java index d61e46833..abc61ea30 100644 --- a/src/main/java/emu/grasscutter/command/CommandMap.java +++ b/src/main/java/emu/grasscutter/command/CommandMap.java @@ -129,7 +129,7 @@ public final class CommandMap { if (player != null) { String permissionNode = this.annotations.get(label).permission(); Account account = player.getAccount(); - if (!Objects.equals(permissionNode, "") && !account.hasPermission(permissionNode)) { + if (!permissionNode.equals("") && !account.hasPermission(permissionNode)) { CommandHandler.sendMessage(player, "You do not have permission to run this command."); return; } diff --git a/src/main/java/emu/grasscutter/command/commands/Account.java b/src/main/java/emu/grasscutter/command/commands/Account.java index 4d4a80db4..be93a7a0c 100644 --- a/src/main/java/emu/grasscutter/command/commands/Account.java +++ b/src/main/java/emu/grasscutter/command/commands/Account.java @@ -48,6 +48,7 @@ public class Account implements CommandHandler { } else { CommandHandler.sendMessage(null, "Account created with UID " + account.getPlayerId() + "."); account.addPermission("*"); // Grant the player superuser permissions. + account.save(); // Save account to database. } return; case "delete":