/// <summary> /// Sends the specified player the specified detail. /// </summary> /// <param name="p">Player to send to.</param> /// <param name="message">The message to send.</param> public static void SendDetail(Player p, string message) { if ((bool)(p.ExtraData.GetIfExist <object, object>("UsingWoM") ?? false)) { message = PluginWoMTextures.ConvertVars(p, message); p.SendMessage("^detail.user=%e" + message); } }
/// <summary> /// Sends all players in the server the specified detail. /// </summary> /// <param name="p">Player to send to.</param> /// <param name="message">The message to send.</param> public static void GlobalSendDetail(string message) { Server.ForeachPlayer(p => { message = PluginWoMTextures.ConvertVars(p, message); if ((bool)(p.ExtraData.GetIfExist <object, object>("UsingWoM") ?? false)) { p.SendMessage("^detail.user=%e" + message); } }); }
/// <summary> /// Sends an alert to all players in a specified level. /// </summary> /// <param name="l">Level to send to.</param> /// <param name="message">Message to send.</param> public static void LevelSendAlert(Level l, string message) { Server.ForeachPlayer(p => { if (l == p.Level) { message = PluginWoMTextures.ConvertVars(p, message); if ((bool)(p.ExtraData.GetIfExist <object, object>("UsingWoM") ?? false)) { p.SendMessage("^detail.user.alert=" + message); } } }); }