public static void Send(Players.Player player, localization.LocalizationHelper localizationHelper, string message, params string[] args) { if (player.IsConnected()) { var messageBuilt = BuildMessage(string.Format(localizationHelper.LocalizeOrDefault(message, player), LocalizeArgs(player, localizationHelper, args)), player, localizationHelper); Chat.Send(player, messageBuilt); } }
public static bool CanSendMesssage(Players.Player p) { if (!_nextSendTime.ContainsKey(p)) { _nextSendTime.Add(p, 0); } return(p.IsConnected() && Time.SecondsSinceStartDouble > _nextSendTime[p]); }
public static void IssueNotification(Players.Player player, localization.LocalizationHelper localizationHelper, string message, params string[] args) { if (player.IsConnected()) { var messageBuilt = string.Format(localizationHelper.LocalizeOrDefault(message, player), PandaChat.LocalizeArgs(player, localizationHelper, args)); IssueNotification(player, messageBuilt); } }
public static void Send(Players.Player player, localization.LocalizationHelper localizationHelper, string message, ChatColor color = ChatColor.white, ChatStyle style = ChatStyle.normal, EChatSendOptions sender = EChatSendOptions.Default) { if (player.IsConnected()) { var messageBuilt = BuildMessage(message, player, localizationHelper, color, style); Chat.Send(player, messageBuilt, sender); } }