From c6a5de4398fcd4e9746d38e83722e468dba58243 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Sat, 23 Dec 2017 14:17:51 -0700 Subject: [PATCH] OnPaintTile now uses GetDataHandledEventArgs. --- TShockAPI/GetDataHandlers.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 09337bc2..86ff009b 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -2108,7 +2108,7 @@ namespace TShockAPI /// /// For use with a PaintTile event /// - public class PaintTileEventArgs : HandledEventArgs + public class PaintTileEventArgs : GetDataHandledEventArgs { /// /// X Location @@ -2128,13 +2128,15 @@ namespace TShockAPI /// public static HandlerList PaintTile = new HandlerList(); - private static bool OnPaintTile(Int32 x, Int32 y, byte t) + private static bool OnPaintTile(TSPlayer player, MemoryStream data, Int32 x, Int32 y, byte t) { if (PaintTile == null) return false; var args = new PaintTileEventArgs { + Player = player, + Data = data, X = x, Y = y, type = t @@ -2919,7 +2921,7 @@ namespace TShockAPI { return true; } - if (OnPaintTile(x, y, t)) + if (OnPaintTile(args.Player, args.Data, x, y, t)) { return true; }