Added ban for placing impossible to place tiles and liquids.
Added ban for attempting to place non-existent liquids.
This commit is contained in:
parent
46fcd29337
commit
43b968e37f
3 changed files with 60 additions and 10 deletions
|
|
@ -200,7 +200,18 @@ namespace TShockAPI
|
|||
|
||||
public static void Ban(CommandArgs args)
|
||||
{
|
||||
string plStr = args.Message.Remove(0, 4).Trim().TrimEnd('"').TrimStart('"');
|
||||
string plStr = args.Message.Remove(0, 4).Trim().TrimEnd('"').TrimStart('"').Split(' ')[0];
|
||||
string[] reason = plStr.Split(' ');
|
||||
string banReason = "";
|
||||
for (int i = 0; i < reason.Length; i++)
|
||||
{
|
||||
if (reason[i].Contains("\""))
|
||||
reason[i] = "";
|
||||
}
|
||||
for (int i = 0; i < reason.Length; i++)
|
||||
{
|
||||
banReason += reason[i];
|
||||
}
|
||||
int adminplr = args.PlayerID;
|
||||
int player = Tools.FindPlayer(plStr);
|
||||
if (!(player == -1 || player == -2 || plStr == ""))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue