mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-24 05:32:52 +08:00
fix:command player said to server won't be shown at chat history (#1643)
Original commits: * fix:command player said to server won't be shown at chat history * Update ChatManager.java
This commit is contained in:
parent
d286f1628e
commit
edd4c8ca88
@ -136,11 +136,6 @@ public class ChatManager implements ChatManagerHandler {
|
|||||||
// Get target.
|
// Get target.
|
||||||
Player target = getServer().getPlayerByUid(targetUid);
|
Player target = getServer().getPlayerByUid(targetUid);
|
||||||
|
|
||||||
// Check if command
|
|
||||||
if (tryInvokeCommand(player, target, message)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (target == null && targetUid != GameConstants.SERVER_CONSOLE_UID) {
|
if (target == null && targetUid != GameConstants.SERVER_CONSOLE_UID) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -152,7 +147,10 @@ public class ChatManager implements ChatManagerHandler {
|
|||||||
player.sendPacket(packet);
|
player.sendPacket(packet);
|
||||||
putInHistory(player.getUid(), targetUid, packet.getChatInfo());
|
putInHistory(player.getUid(), targetUid, packet.getChatInfo());
|
||||||
|
|
||||||
if (target != null) {
|
// Check if command
|
||||||
|
boolean isCommand = tryInvokeCommand(player, target, message);
|
||||||
|
|
||||||
|
if ((target != null) && (!isCommand)) {
|
||||||
target.sendPacket(packet);
|
target.sendPacket(packet);
|
||||||
putInHistory(targetUid, player.getUid(), packet.getChatInfo());
|
putInHistory(targetUid, player.getUid(), packet.getChatInfo());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user