Hookpoints: ChestBreakReceived - SignatureBeef/Terraria-s-Dedicated-Server-Mod GitHub Wiki
Summary
When a chest is broken, this event is triggered.
Object Returned
Data Type | Object | Description |
---|---|---|
int | X | X coordinate of the chest. |
int | Y | Y coordinate of the chest. |
Example
Lua
import ('Terraria') -- for Main class.
function YourPlugin:Initialized()
export.Hooks = {}
export.Hooks.ChestBreakReceived
{
Call = export.OnChestBreakReceived,
}
end
function YourPlugin:OnChestBreakReceived(ctx, args)
Tools.WriteLine( tostring( args.X ) .. "," .. tostring( args.Y ) )
end