mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-16 08:56:04 +01:00
Fix the chat history not correctly showing.
This commit is contained in:
@@ -1052,7 +1052,9 @@ public class Player {
|
||||
this.messageHandler.append(message.toString());
|
||||
return;
|
||||
}
|
||||
this.sendPacket(new PacketPrivateChatNotify(GameConstants.SERVER_CONSOLE_UID, getUid(), message.toString()));
|
||||
|
||||
this.getServer().getChatManager().sendPrivateMessageFromServer(getUid(), message.toString());
|
||||
// this.sendPacket(new PacketPrivateChatNotify(GameConstants.SERVER_CONSOLE_UID, getUid(), message.toString()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1062,7 +1064,8 @@ public class Player {
|
||||
* @param message The message to send.
|
||||
*/
|
||||
public void sendMessage(Player sender, Object message) {
|
||||
this.sendPacket(new PacketPrivateChatNotify(sender.getUid(), this.getUid(), message.toString()));
|
||||
// this.sendPacket(new PacketPrivateChatNotify(sender.getUid(), this.getUid(), message.toString()));
|
||||
this.getServer().getChatManager().sendPrivateMessage(sender, this.getUid(), message.toString());
|
||||
}
|
||||
|
||||
// ---------------------MAIL------------------------
|
||||
@@ -1541,6 +1544,9 @@ public class Player {
|
||||
// First notify packets sent
|
||||
this.setHasSentAvatarDataNotify(true);
|
||||
|
||||
// Send server welcome chat.
|
||||
this.getServer().getChatManager().sendServerWelcomeMessages(this);
|
||||
|
||||
// Set session state
|
||||
session.setState(SessionState.ACTIVE);
|
||||
|
||||
@@ -1558,6 +1564,9 @@ public class Player {
|
||||
|
||||
public void onLogout() {
|
||||
try{
|
||||
// Clear chat history.
|
||||
this.getServer().getChatManager().clearHistoryOnLogout(this);
|
||||
|
||||
// stop stamina calculation
|
||||
getStaminaManager().stopSustainedStaminaHandler();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user