private async Task ServerSendChatAsync(string text, IInnerPlayerControl player) { string playername = player.PlayerInfo.PlayerName; await player.SetNameAsync($"PublicMsg").ConfigureAwait(false); await player.SendChatAsync($"{text}").ConfigureAwait(false); await player.SetNameAsync(playername); }
private async Task ServerSendChatAsync(string text, IInnerPlayerControl player) { string playername = player.PlayerInfo.PlayerName; byte playercolor = player.PlayerInfo.ColorId; await player.SetColorAsync(ColorType.Black).ConfigureAwait(false); await player.SetNameAsync($"<Server>").ConfigureAwait(false); await player.SendChatAsync($"{text}").ConfigureAwait(false); await player.SetColorAsync(playercolor); await player.SetNameAsync(playername); }
public async ValueTask <int> SendMessage(IInnerPlayerControl player, string message) { string name = player.PlayerInfo.PlayerName; byte color = player.PlayerInfo.ColorId; await player.SetNameAsync("[FF0000FF]All Of Us Bot | Public"); await player.SetColorAsync((byte)0); await player.SendChatAsync(message); await player.SetNameAsync(name); await player.SetColorAsync(color); return(0); }