diff --git a/core/src/mindustry/entities/comp/PlayerComp.java b/core/src/mindustry/entities/comp/PlayerComp.java index 6c5d8b1cdf..ec3c5749f3 100644 --- a/core/src/mindustry/entities/comp/PlayerComp.java +++ b/core/src/mindustry/entities/comp/PlayerComp.java @@ -323,13 +323,7 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra } void sendMessage(String text){ - if(isLocal()){ - if(ui != null){ - ui.chatfrag.addMessage(text); - } - }else{ - Call.sendMessage(con, text, null, null); - } + sendMessage(text, null, null); } void sendMessage(String text, Player from){ @@ -346,6 +340,14 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra } } + void sendUnformatted(String unformatted){ + sendUnformatted(null, unformatted); + } + + void sendUnformatted(Player from, String unformatted){ + sendMessage(netServer.chatFormatter.format(from, unformatted), from, unformatted); + } + PlayerInfo getInfo(){ if(isLocal()){ throw new IllegalArgumentException("Local players cannot be traced and do not have info.");