sendUnformatted method in PlayerComp (#8575)
This commit is contained in:
@@ -323,13 +323,7 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
|
|||||||
}
|
}
|
||||||
|
|
||||||
void sendMessage(String text){
|
void sendMessage(String text){
|
||||||
if(isLocal()){
|
sendMessage(text, null, null);
|
||||||
if(ui != null){
|
|
||||||
ui.chatfrag.addMessage(text);
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
Call.sendMessage(con, text, null, null);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void sendMessage(String text, Player from){
|
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(){
|
PlayerInfo getInfo(){
|
||||||
if(isLocal()){
|
if(isLocal()){
|
||||||
throw new IllegalArgumentException("Local players cannot be traced and do not have info.");
|
throw new IllegalArgumentException("Local players cannot be traced and do not have info.");
|
||||||
|
|||||||
Reference in New Issue
Block a user