From 402226788889fc36da8e9d2d0b856885ea268710 Mon Sep 17 00:00:00 2001 From: KittenPixel <79544605+KittenPixel-cell@users.noreply.github.com> Date: Mon, 13 May 2024 18:58:46 -0700 Subject: [PATCH] Configuration Update - Shown Email (#2509) * This version will allow the private server owner to show a different email then "@grasscutter.io" if they want. * Update src/main/java/emu/grasscutter/config/ConfigContainer.java Co-authored-by: Magix <27646710+KingRainbow44@users.noreply.github.com> * Update src/main/java/emu/grasscutter/game/Account.java Co-authored-by: Magix <27646710+KingRainbow44@users.noreply.github.com> * Update src/main/java/emu/grasscutter/game/Account.java Co-authored-by: Magix <27646710+KingRainbow44@users.noreply.github.com> --------- Co-authored-by: Magix <27646710+KingRainbow44@users.noreply.github.com> --- src/main/java/emu/grasscutter/config/ConfigContainer.java | 1 + src/main/java/emu/grasscutter/game/Account.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/emu/grasscutter/config/ConfigContainer.java b/src/main/java/emu/grasscutter/config/ConfigContainer.java index fd264e26b..2b6d20978 100644 --- a/src/main/java/emu/grasscutter/config/ConfigContainer.java +++ b/src/main/java/emu/grasscutter/config/ConfigContainer.java @@ -140,6 +140,7 @@ public class ConfigContainer { public boolean autoCreate = false; public boolean EXPERIMENTAL_RealPassword = false; public String[] defaultPermissions = {}; + public String playerEmail = "grasscutter.io"; public int maxPlayer = -1; } diff --git a/src/main/java/emu/grasscutter/game/Account.java b/src/main/java/emu/grasscutter/game/Account.java index da1193b98..c796b9981 100644 --- a/src/main/java/emu/grasscutter/game/Account.java +++ b/src/main/java/emu/grasscutter/game/Account.java @@ -109,7 +109,7 @@ public class Account { return email; } else { // As of game version 3.5+, only the email is displayed to a user. - return this.getUsername() + "@grasscutter.io"; + return this.getUsername() + "@" + ACCOUNT.playerEmail; } } @@ -235,7 +235,7 @@ public class Account { this.addPermission("*"); } - // Set account default language as server default language + // Set account default language to server default language if (!document.containsKey("locale")) { this.locale = LANGUAGE; }