diff --git a/src/main/java/emu/grasscutter/Config.java b/src/main/java/emu/grasscutter/Config.java index 56a1a0352..c2d7850fd 100644 --- a/src/main/java/emu/grasscutter/Config.java +++ b/src/main/java/emu/grasscutter/Config.java @@ -51,6 +51,7 @@ public final class Config { public static class GameServerOptions { public String Name = "Test"; + public String NickName = "Server"; public String Ip = "0.0.0.0"; public String PublicIp = "127.0.0.1"; public int Port = 22102; diff --git a/src/main/java/emu/grasscutter/GameConstants.java b/src/main/java/emu/grasscutter/GameConstants.java index ab48c01c7..317221ec6 100644 --- a/src/main/java/emu/grasscutter/GameConstants.java +++ b/src/main/java/emu/grasscutter/GameConstants.java @@ -12,6 +12,7 @@ public final class GameConstants { public static final int MAIN_CHARACTER_MALE = 10000005; public static final int MAIN_CHARACTER_FEMALE = 10000007; public static final int SERVER_AVATAR_ID = Grasscutter.getConfig().getGameServerOptions().ServerAvatarId; + public static final String SERVER_AVATAR_NAME = Grasscutter.getConfig().getGameServerOptions().NickName; public static final Position START_POSITION = new Position(2747, 194, -1719); public static final int MAX_FRIENDS = 45; diff --git a/src/main/java/emu/grasscutter/server/packet/send/PacketGetPlayerFriendListRsp.java b/src/main/java/emu/grasscutter/server/packet/send/PacketGetPlayerFriendListRsp.java index e085e6f6e..d7a9427b8 100644 --- a/src/main/java/emu/grasscutter/server/packet/send/PacketGetPlayerFriendListRsp.java +++ b/src/main/java/emu/grasscutter/server/packet/send/PacketGetPlayerFriendListRsp.java @@ -18,7 +18,7 @@ public class PacketGetPlayerFriendListRsp extends BasePacket { FriendBrief serverFriend = FriendBrief.newBuilder() .setUid(GameConstants.SERVER_CONSOLE_UID) - .setNickname("Server") + .setNickname(GameConstants.SERVER_AVATAR_NAME) .setLevel(1) .setProfilePicture(ProfilePicture.newBuilder().setAvatarId(GameConstants.SERVER_AVATAR_ID)) .setWorldLevel(0)