using System; using System.Collections.Generic; using StardewModdingAPI.Framework; using StardewValley; namespace StardewModdingAPI.Entities { /// Static class for integrating with the player. [Obsolete("This API was never officially documented and will be removed soon.")] public class SPlayer { /********* ** Accessors *********/ /// Obsolete. [Obsolete("Use " + nameof(Game1) + "." + nameof(Game1.getAllFarmers) + " instead")] public static List AllFarmers { get { Program.DeprecationManager.Warn(nameof(SPlayer), "1.0", DeprecationLevel.Info); return Game1.getAllFarmers(); } } /// Obsolete. [Obsolete("Use " + nameof(Game1) + "." + nameof(Game1.player) + " instead")] public static Farmer CurrentFarmer { get { Program.DeprecationManager.Warn(nameof(SPlayer), "1.0", DeprecationLevel.Info); return Game1.player; } } /// Obsolete. [Obsolete("Use " + nameof(Game1) + "." + nameof(Game1.player) + " instead")] public static Farmer Player { get { Program.DeprecationManager.Warn(nameof(SPlayer), "1.0", DeprecationLevel.Info); return Game1.player; } } /// Obsolete. [Obsolete("Use " + nameof(Game1) + "." + nameof(Game1.player) + "." + nameof(Farmer.currentLocation) + " instead")] public static GameLocation CurrentFarmerLocation { get { Program.DeprecationManager.Warn(nameof(SPlayer), "1.0", DeprecationLevel.Info); return Game1.player.currentLocation; } } } }