Removed some old code

This commit is contained in:
Lucas Nicodemus 2012-05-26 11:52:05 -06:00
parent d01ae01468
commit 8ea0b40214
2 changed files with 17 additions and 6 deletions

View file

@ -77,8 +77,6 @@ namespace TShockAPI
/// </summary> /// </summary>
public static event Action Initialized; public static event Action Initialized;
public static List<int> TakenPlayerIDs = new List<int>();
public override Version Version public override Version Version
{ {
get { return VersionNum; } get { return VersionNum; }

View file

@ -27,11 +27,22 @@ using Terraria;
namespace TShockAPI namespace TShockAPI
{ {
/// <summary>
/// Utilities and other TShock core calls that don't fit anywhere else
/// </summary>
public class Utils public class Utils
{ {
private readonly static int firstItemPrefix = 1; /// <summary>
private readonly static int lastItemPrefix = 83; /// Document me
// Utils is a Singleton /// </summary>
private const int firstItemPrefix = 1;
/// <summary>
/// Document me
/// </summary>
private const int lastItemPrefix = 83;
// Utils is a Singleton
private static readonly Utils instance = new Utils(); private static readonly Utils instance = new Utils();
private Utils() {} private Utils() {}
public static Utils Instance { get { return instance; } } public static Utils Instance { get { return instance; } }
@ -96,7 +107,7 @@ namespace TShockAPI
/// <summary> /// <summary>
/// Finds a player and gets IP as string /// Finds a player and gets IP as string
/// </summary> /// </summary>
/// <param name="msg">Player name</param> /// <param name="playername">string playername</param>
public string GetPlayerIP(string playername) public string GetPlayerIP(string playername)
{ {
foreach (TSPlayer player in TShock.Players) foreach (TSPlayer player in TShock.Players)
@ -210,7 +221,9 @@ namespace TShockAPI
return new List<TSPlayer> { player }; return new List<TSPlayer> { player };
} }
} }
// ReSharper disable EmptyGeneralCatchClause
catch (Exception e) catch (Exception e)
// ReSharper restore EmptyGeneralCatchClause
{ {
// Conversion failed // Conversion failed
} }