public static void ReplyLang(this IPlayer player, string key, KeyValuePair <string, string> replacement) { string message = BetterChat.GetMessage(key, player.Id); message = message.Replace($"{{{replacement.Key}}}", replacement.Value); player.Reply(message); }
public static void ReplyLang(this IPlayer player, string key, Dictionary <string, string> replacements = null) { string message = BetterChat.GetMessage(key, player.Id); if (replacements != null) { foreach (var replacement in replacements) { message = message.Replace($"{{{replacement.Key}}}", replacement.Value); } } replacements = null; player.Reply(message); }