diff --git a/src/main/java/emu/grasscutter/game/player/Player.java b/src/main/java/emu/grasscutter/game/player/Player.java index a1ce85c30..586a4bfd8 100644 --- a/src/main/java/emu/grasscutter/game/player/Player.java +++ b/src/main/java/emu/grasscutter/game/player/Player.java @@ -798,7 +798,7 @@ public class Player { return; } - this.getServer().getChatManager().sendPrivateMessageFromServer(getUid(), message.toString()); + this.getServer().getChatSystem().sendPrivateMessageFromServer(getUid(), message.toString()); // this.sendPacket(new PacketPrivateChatNotify(GameConstants.SERVER_CONSOLE_UID, getUid(), message.toString())); } @@ -810,7 +810,7 @@ public class Player { */ public void sendMessage(Player sender, Object message) { // this.sendPacket(new PacketPrivateChatNotify(sender.getUid(), this.getUid(), message.toString())); - this.getServer().getChatManager().sendPrivateMessage(sender, this.getUid(), message.toString()); + this.getServer().getChatSystem().sendPrivateMessage(sender, this.getUid(), message.toString()); } // ---------------------MAIL------------------------ @@ -1199,7 +1199,7 @@ public class Player { this.hasSentLoginPackets = true; // Send server welcome chat. - this.getServer().getChatManager().sendServerWelcomeMessages(this); + this.getServer().getChatSystem().sendServerWelcomeMessages(this); // Set session state session.setState(SessionState.ACTIVE); @@ -1219,7 +1219,7 @@ public class Player { public void onLogout() { try { // Clear chat history. - this.getServer().getChatManager().clearHistoryOnLogout(this); + this.getServer().getChatSystem().clearHistoryOnLogout(this); // stop stamina calculation getStaminaManager().stopSustainedStaminaHandler(); diff --git a/src/main/java/emu/grasscutter/server/packet/recv/HandlerPlayerChatReq.java b/src/main/java/emu/grasscutter/server/packet/recv/HandlerPlayerChatReq.java index db0704ed8..3ae1abc96 100644 --- a/src/main/java/emu/grasscutter/server/packet/recv/HandlerPlayerChatReq.java +++ b/src/main/java/emu/grasscutter/server/packet/recv/HandlerPlayerChatReq.java @@ -17,9 +17,9 @@ public class HandlerPlayerChatReq extends PacketHandler { ChatInfo.ContentCase content = req.getChatInfo().getContentCase(); if (content == ChatInfo.ContentCase.TEXT) { - session.getServer().getChatManager().sendTeamMessage(session.getPlayer(), req.getChannelId(), req.getChatInfo().getText()); + session.getServer().getChatSystem().sendTeamMessage(session.getPlayer(), req.getChannelId(), req.getChatInfo().getText()); } else if (content == ChatInfo.ContentCase.ICON) { - session.getServer().getChatManager().sendTeamMessage(session.getPlayer(), req.getChannelId(), req.getChatInfo().getIcon()); + session.getServer().getChatSystem().sendTeamMessage(session.getPlayer(), req.getChannelId(), req.getChatInfo().getIcon()); } session.send(new PacketPlayerChatRsp()); diff --git a/src/main/java/emu/grasscutter/server/packet/recv/HandlerPrivateChatReq.java b/src/main/java/emu/grasscutter/server/packet/recv/HandlerPrivateChatReq.java index 89c0621cb..828024f8f 100644 --- a/src/main/java/emu/grasscutter/server/packet/recv/HandlerPrivateChatReq.java +++ b/src/main/java/emu/grasscutter/server/packet/recv/HandlerPrivateChatReq.java @@ -15,9 +15,9 @@ public class HandlerPrivateChatReq extends PacketHandler { PrivateChatReq.ContentCase content = req.getContentCase(); if (content == PrivateChatReq.ContentCase.TEXT) { - session.getServer().getChatManager().sendPrivateMessage(session.getPlayer(), req.getTargetUid(), req.getText()); + session.getServer().getChatSystem().sendPrivateMessage(session.getPlayer(), req.getTargetUid(), req.getText()); } else if (content == PrivateChatReq.ContentCase.ICON) { - session.getServer().getChatManager().sendPrivateMessage(session.getPlayer(), req.getTargetUid(), req.getIcon()); + session.getServer().getChatSystem().sendPrivateMessage(session.getPlayer(), req.getTargetUid(), req.getIcon()); } } diff --git a/src/main/java/emu/grasscutter/server/packet/recv/HandlerPullPrivateChatReq.java b/src/main/java/emu/grasscutter/server/packet/recv/HandlerPullPrivateChatReq.java index 191d96d31..cd0eb5d79 100644 --- a/src/main/java/emu/grasscutter/server/packet/recv/HandlerPullPrivateChatReq.java +++ b/src/main/java/emu/grasscutter/server/packet/recv/HandlerPullPrivateChatReq.java @@ -14,7 +14,7 @@ public class HandlerPullPrivateChatReq extends PacketHandler { public void handle(GameSession session, byte[] header, byte[] payload) throws Exception { PullPrivateChatReq req = PullPrivateChatReq.parseFrom(payload); - session.getServer().getChatManager().handlePullPrivateChatReq(session.getPlayer(), req.getTargetUid()); + session.getServer().getChatSystem().handlePullPrivateChatReq(session.getPlayer(), req.getTargetUid()); // session.send(new PacketPullPrivateChatRsp(req.getTargetUid())); } diff --git a/src/main/java/emu/grasscutter/server/packet/recv/HandlerPullRecentChatReq.java b/src/main/java/emu/grasscutter/server/packet/recv/HandlerPullRecentChatReq.java index 1db217e2d..9856a1443 100644 --- a/src/main/java/emu/grasscutter/server/packet/recv/HandlerPullRecentChatReq.java +++ b/src/main/java/emu/grasscutter/server/packet/recv/HandlerPullRecentChatReq.java @@ -10,6 +10,6 @@ import emu.grasscutter.server.packet.send.PacketPullRecentChatRsp; public class HandlerPullRecentChatReq extends PacketHandler { @Override public void handle(GameSession session, byte[] header, byte[] payload) throws Exception { - session.getServer().getChatManager().handlePullRecentChatReq(session.getPlayer()); + session.getServer().getChatSystem().handlePullRecentChatReq(session.getPlayer()); } }