Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
62f0be49
Commit
62f0be49
authored
Apr 29, 2022
by
xtaodada
Browse files
Support custom server in-game nickname
parent
01364256
Changes
3
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/Config.java
View file @
62f0be49
...
...
@@ -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
;
...
...
src/main/java/emu/grasscutter/GameConstants.java
View file @
62f0be49
...
...
@@ -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
;
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketGetPlayerFriendListRsp.java
View file @
62f0be49
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment