#nullable disable using System; using StardewValley; namespace StardewModdingAPI.Events { /// Event arguments for an event. public class WarpedEventArgs : EventArgs { /********* ** Accessors *********/ /// The player who warped to a new location. public Farmer Player { get; } /// The player's previous location. public GameLocation OldLocation { get; } /// The player's current location. public GameLocation NewLocation { get; } /// Whether the affected player is the local one. public bool IsLocalPlayer => this.Player.IsLocalPlayer; /********* ** Public methods *********/ /// Construct an instance. /// The player who warped to a new location. /// The player's previous location. /// The player's current location. internal WarpedEventArgs(Farmer player, GameLocation oldLocation, GameLocation newLocation) { this.Player = player; this.NewLocation = newLocation; this.OldLocation = oldLocation; } } }