diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index f38de154..f2ae168d 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -375,10 +375,8 @@ namespace TShockAPI /// /// For use in a PlaceChest event /// - public class PlaceChestEventArgs : HandledEventArgs + public class PlaceChestEventArgs : GetDataHandledEventArgs { - /// The TSPlayer that triggered the event - public TSPlayer Player { get; set; } /// What the packet is doing (see MP packet docs). public int Flag { get; set; } /// @@ -395,7 +393,7 @@ namespace TShockAPI /// public static HandlerList PlaceChest = new HandlerList(); - private static bool OnPlaceChest(TSPlayer player, int flag, int tilex, int tiley) + private static bool OnPlaceChest(TSPlayer player, MemoryStream data, int flag, int tilex, int tiley) { if (PlaceChest == null) return false; @@ -403,6 +401,7 @@ namespace TShockAPI var args = new PlaceChestEventArgs { Player = player, + Data = data, Flag = flag, TileX = tilex, TileY = tiley, @@ -2496,7 +2495,7 @@ namespace TShockAPI int tileY = args.Data.ReadInt16(); args.Data.ReadInt16(); // Ignore style - if (OnPlaceChest(args.Player, flag, tileX, tileY)) + if (OnPlaceChest(args.Player, args.Data, flag, tileX, tileY)) return true; return false;