Add the region a player left to OnRegionLeft

This commit is contained in:
Lucas Nicodemus 2015-03-06 22:40:32 -07:00
parent fd2a049ef3
commit adc0f0acfb
2 changed files with 6 additions and 4 deletions

View file

@ -47,23 +47,25 @@ namespace TShockAPI.Hooks
public class RegionLeftEventArgs
{
public TSPlayer Player { get; private set; }
public Region Region { get; private set; }
public RegionLeftEventArgs(TSPlayer ply)
public RegionLeftEventArgs(TSPlayer ply, Region region)
{
Player = ply;
Region = region;
}
}
public delegate void RegionLeftD(RegionLeftEventArgs args);
public static event RegionLeftD RegionLeft;
public static void OnRegionLeft(TSPlayer player)
public static void OnRegionLeft(TSPlayer player, Region region)
{
if (RegionLeft == null)
{
return;
}
RegionLeft(new RegionLeftEventArgs(player));
RegionLeft(new RegionLeftEventArgs(player, region));
}
public class RegionCreatedEventArgs