Player.players should be a field to avoid breaking backwards compatibility. (Thanks tommyz)

This commit is contained in:
UnknownShadow200 2016-02-15 09:52:27 +11:00
parent 4ddf7f438d
commit 1f86415dfc
3 changed files with 8 additions and 6 deletions

View File

@ -2414,16 +2414,16 @@ catch { }*/
#endregion
#region == OTHER ==
[Obsolete]
public static List<Player> players { get { return PlayerInfo.players; } }
[Obsolete("Use PlayerInfo.players")]
public static List<Player> players;
[Obsolete]
[Obsolete("Use PlayerInfo.Find(name)")]
public static Player Find(string name) { return PlayerInfo.Find(name); }
[Obsolete]
[Obsolete("Use PlayerInfo.FindExact(name)")]
public static Player FindExact(string name) { return PlayerInfo.FindExact(name); }
[Obsolete]
[Obsolete("Use PlayerInfo.FindNick(name)")]
public static Player FindNick(string name) { return PlayerInfo.FindNick(name); }
static byte FreeId() {

View File

@ -22,7 +22,7 @@ namespace MCGalaxy {
public static class PlayerInfo {
/// <summary> List of all server players. </summary>
public static List<Player> players = new List<Player>();
public static List<Player> players;
public static List<Player> GetPlayers() { return new List<Player>(PlayerInfo.players); }

View File

@ -408,6 +408,8 @@ namespace MCGalaxy
}
public void Start() {
PlayerInfo.players = new List<Player>();
Player.players = PlayerInfo.players;
StartTime = DateTime.UtcNow;
StartTimeLocal = StartTime.ToLocalTime();
shuttingDown = false;