Removed pointless unbanip permission.

TSPlayer improved.
This commit is contained in:
high 2011-06-14 19:49:45 -04:00
parent f233ef82e5
commit 12946c8a63
4 changed files with 17 additions and 7 deletions

View file

@ -174,7 +174,7 @@ namespace TShockAPI
ChatCommands.Add(new Command("ban", "ban", Ban));
ChatCommands.Add(new Command("banip", "ban", BanIP));
ChatCommands.Add(new Command("unban", "unban", UnBan));
ChatCommands.Add(new Command("unbanip", "unbanip", UnBanIP));
ChatCommands.Add(new Command("unbanip", "unban", UnBanIP));
ChatCommands.Add(new Command("off", "maintenance", Off));
ChatCommands.Add(new Command("off-nosave", "maintenance", OffNoSave));
ChatCommands.Add(new Command("checkupdates", "maintenance", CheckUpdates));
@ -218,6 +218,10 @@ namespace TShockAPI
ChatCommands.Add(new Command("give", "cheat", Give));
ChatCommands.Add(new Command("heal", "cheat", Heal));
}
}
#region Command Methods

View file

@ -22,6 +22,9 @@ namespace TShockAPI
{
public class TSPlayer
{
public static readonly TSPlayer Server = new TSPlayer(new Player { name = "Server" });
public uint TileThreshold { get; set; }
public Dictionary<TShock.Position, Tile> TilesDestroyed { get; set; }
public bool SyncHP { get; set; }
@ -29,14 +32,16 @@ namespace TShockAPI
public Group Group { get; set; }
public bool ReceivedInfo { get; set; }
public int Index { get; private set; }
public int Index { get { return TPlayer.whoAmi; } }
/// <summary>
/// Terraria Player
/// </summary>
public Player TPlayer
public Player TPlayer { get; protected set; }
public string Name
{
get { return Main.player[Index]; }
get { return TPlayer.name; }
}
public float X
@ -56,9 +61,10 @@ namespace TShockAPI
get { return (int)(TPlayer.position.Y / 16); }
}
public TSPlayer(int ply)
public TSPlayer(Player ply)
{
TilesDestroyed = new Dictionary<TShock.Position, Tile>();
TPlayer = ply;
}
}
}

View file

@ -659,7 +659,7 @@ namespace TShockAPI
}
string ip = Tools.GetPlayerIP(ply);
Players[ply] = new TSPlayer(ply);
Players[ply] = new TSPlayer(Main.player[ply]);
Players[ply].Group = Tools.GetGroupForIP(ip);
if (Tools.ActivePlayers() + 1 > ConfigurationManager.MaxSlots &&

View file

@ -17,5 +17,5 @@
default null canwater canlava
vip default reservedslot
newadmin default kick editspawn reservedslot
admin newadmin ban unban unbanip causeevents spawnboss spawnmob tp immunetokick kill logs
admin newadmin ban unban causeevents spawnboss spawnmob tp immunetokick kill logs
trustedadmin admin maintenance cfg cheat pvpfun ignorecheatdetection immunetoban ignoregriefdetection