Commit edd4c8ca authored by dragon's avatar dragon Committed by GitHub
Browse files

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
parent d286f162
......@@ -136,11 +136,6 @@ public class ChatManager implements ChatManagerHandler {
// Get target.
Player target = getServer().getPlayerByUid(targetUid);
// Check if command
if (tryInvokeCommand(player, target, message)) {
return;
}
if (target == null && targetUid != GameConstants.SERVER_CONSOLE_UID) {
return;
}
......@@ -152,7 +147,10 @@ public class ChatManager implements ChatManagerHandler {
player.sendPacket(packet);
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);
putInHistory(targetUid, player.getUid(), packet.getChatInfo());
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment