diff --git a/src/main/java/emu/grasscutter/Config.java b/src/main/java/emu/grasscutter/Config.java index ee5fe65c8..3e6e16d20 100644 --- a/src/main/java/emu/grasscutter/Config.java +++ b/src/main/java/emu/grasscutter/Config.java @@ -33,6 +33,7 @@ public final class Config { public Boolean FrontHTTPS = true; public boolean AutomaticallyCreateAccounts = false; + public String[] defaultPermissions = new String[] { "" }; public RegionInfo[] GameServers = {}; diff --git a/src/main/java/emu/grasscutter/server/dispatch/DispatchServer.java b/src/main/java/emu/grasscutter/server/dispatch/DispatchServer.java index 1ac721ce2..99c5e4f8d 100644 --- a/src/main/java/emu/grasscutter/server/dispatch/DispatchServer.java +++ b/src/main/java/emu/grasscutter/server/dispatch/DispatchServer.java @@ -339,6 +339,10 @@ public final class DispatchServer { // added. account = DatabaseHelper.createAccountWithId(requestData.account, 0); + for (String permission : Grasscutter.getConfig().getDispatchOptions().defaultPermissions) { + account.addPermission(permission); + } + if (account != null) { responseData.message = "OK"; responseData.data.account.uid = account.getId();