Killed the Obsolete SendMessage method
This commit is contained in:
parent
e392e69a96
commit
eb8d1e180f
4 changed files with 12 additions and 23 deletions
|
|
@ -261,24 +261,24 @@ namespace TShockAPI
|
|||
lineOne += "BanCheater : " + ConfigurationManager.banCheater + ", ";
|
||||
lineOne += "KickGriefer : " + ConfigurationManager.kickGriefer + ", ";
|
||||
lineOne += "BanGriefer : " + ConfigurationManager.banGriefer;
|
||||
Tools.SendMessage(ply, lineOne, 255f, 255f, 0f);
|
||||
Tools.SendMessage(ply, lineOne, Color.Yellow);
|
||||
string lineTwo = "";
|
||||
lineTwo += "BanTnt : " + ConfigurationManager.banTnt + ", ";
|
||||
lineTwo += "KickTnt : " + ConfigurationManager.kickTnt + ", ";
|
||||
lineTwo += "BanBoom : " + ConfigurationManager.banBoom + ", ";
|
||||
lineTwo += "KickBoom : " + ConfigurationManager.kickBoom;
|
||||
Tools.SendMessage(ply, lineTwo, 255f, 255f, 0f);
|
||||
Tools.SendMessage(ply, lineTwo, Color.Yellow);
|
||||
string lineThree = "";
|
||||
lineThree += "InvMultiplier : " + ConfigurationManager.invasionMultiplier + ", ";
|
||||
lineThree += "ProtectS : " + ConfigurationManager.spawnProtect + ", ";
|
||||
lineThree += "ProtectR : " + ConfigurationManager.spawnProtectRadius + ", ";
|
||||
lineThree += "DMS : " + ConfigurationManager.defaultMaxSpawns + ", ";
|
||||
lineThree += "SpawnRate: " + ConfigurationManager.defaultSpawnRate;
|
||||
Tools.SendMessage(ply, lineThree, 255f, 255f, 0f);
|
||||
Tools.SendMessage(ply, lineThree, Color.Yellow);
|
||||
string lineFour = "";
|
||||
lineFour += "MaxSlots : " + ConfigurationManager.maxSlots + ", ";
|
||||
lineFour += "RangeChecks : " + ConfigurationManager.rangeChecks + ", ";
|
||||
Tools.SendMessage(ply, lineFour, 255f, 255f, 0f);
|
||||
Tools.SendMessage(ply, lineFour, Color.Yellow);
|
||||
}
|
||||
|
||||
public static void Kick(CommandArgs args)
|
||||
|
|
@ -823,19 +823,19 @@ namespace TShockAPI
|
|||
tempstring += "/" + cmdlist[j].Name() + ", ";
|
||||
if (j == cmdlist.Count - 1)
|
||||
{
|
||||
Tools.SendMessage(ply, tempstring.TrimEnd(new[] { ' ', ',' }), new[] { 255f, 255f, 0f });
|
||||
Tools.SendMessage(ply, tempstring.TrimEnd(new[] { ' ', ',' }), Color.Yellow);
|
||||
break;
|
||||
}
|
||||
if ((j + 1) % 5 == 0)
|
||||
{
|
||||
Tools.SendMessage(ply, tempstring.TrimEnd(new[] { ' ', ',' }), new[] { 255f, 255f, 0f });
|
||||
Tools.SendMessage(ply, tempstring.TrimEnd(new[] { ' ', ',' }), Color.Yellow);
|
||||
tempstring = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (cmdlist.Count > (15 * page))
|
||||
{
|
||||
Tools.SendMessage(ply, "Type /help " + (page + 1) + " for more commands.", new[] { 255f, 0f, 255f });
|
||||
Tools.SendMessage(ply, "Type /help " + (page + 1) + " for more commands.", Color.Yellow);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -336,8 +336,7 @@ namespace TShockAPI
|
|||
var flag = CheckSpawn(x, y);
|
||||
if (flag)
|
||||
{
|
||||
Tools.SendMessage(e.Msg.whoAmI, "Spawn protected from changes.",
|
||||
new[] { 255f, 0f, 0f });
|
||||
Tools.SendMessage(e.Msg.whoAmI, "Spawn protected from changes.", Color.Red);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -521,7 +520,7 @@ namespace TShockAPI
|
|||
var flag = CheckSpawn(x, y);
|
||||
if (flag)
|
||||
{
|
||||
Tools.SendMessage(e.Msg.whoAmI, "The spawn is protected!", new[] { 255f, 0f, 0f });
|
||||
Tools.SendMessage(e.Msg.whoAmI, "The spawn is protected!", Color.Red);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -673,8 +672,6 @@ namespace TShockAPI
|
|||
Console.WriteLine("This token will only display ONCE. This only works ONCE. If you don't use it and the server goes down, delete auth.lck.");
|
||||
FileTools.CreateFile(FileTools.SaveDir + "auth.lck");
|
||||
}
|
||||
|
||||
//ConfigurationManager.maxSlots = Main.maxPlayers - 1;
|
||||
}
|
||||
|
||||
private void OnUpdate(GameTime time)
|
||||
|
|
|
|||
|
|
@ -95,12 +95,6 @@ namespace TShockAPI
|
|||
Log.Info("Broadcast: " + msg);
|
||||
}
|
||||
|
||||
[Obsolete("STOP USING THIS")]
|
||||
public static void SendMessage(int ply, string msg, float[] colors)
|
||||
{
|
||||
SendMessage(ply, msg, colors[0],colors[1],colors[2]);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a message out to a single player
|
||||
/// </summary>
|
||||
|
|
@ -357,10 +351,7 @@ namespace TShockAPI
|
|||
{
|
||||
try
|
||||
{
|
||||
pC[0] = Clamp(Convert.ToInt32(pCc[0]), 255, 0);
|
||||
pC[1] = Clamp(Convert.ToInt32(pCc[1]), 255, 0);
|
||||
pC[2] = Clamp(Convert.ToInt32(pCc[2]), 255, 0);
|
||||
SendMessage(ply, foo, pC);
|
||||
SendMessage(ply, foo, Clamp(Convert.ToInt32(pCc[0]), 255, 0), Clamp(Convert.ToInt32(pCc[1]), 255, 0), Clamp(Convert.ToInt32(pCc[2]), 255, 0));
|
||||
continue;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ using System.Net;
|
|||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
|
||||
namespace TShockAPI
|
||||
|
|
@ -64,7 +65,7 @@ namespace TShockAPI
|
|||
Tools.SendMessage(i, "The server is out of date. To update, type /updatenow.");
|
||||
for (int j = 4; j < changes.Length; j++)
|
||||
{
|
||||
Tools.SendMessage(i, changes[j], 255, 0, 0);
|
||||
Tools.SendMessage(i, changes[j], Color.Red);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue