From 23bca008317e125659d4b97f29cf13da81a7aecd Mon Sep 17 00:00:00 2001 From: KrystilizeNevaDies <57762380+KrystilizeNevaDies@users.noreply.github.com> Date: Tue, 22 Sep 2020 01:31:45 +1000 Subject: Implement Dropspenser Hook (#4903) * Implement Dropspenser Hook Implemented a hook for dropspensing. HOOK_DROPSPENSE When plugin callback returns true then dropspense is cancelled * Update src/Bindings/PluginManager.h Co-authored-by: peterbell10 * Create OnDropSpense.lua * Fix indent * Forgot include Forgot to include the plugin manager. Although now im confused why it was working on my end without including the plugin manager * Update plugins.lua with dropspense * fix typos * haha notepad++ go brr Co-authored-by: peterbell10 --- src/Bindings/Plugin.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Bindings/Plugin.h') diff --git a/src/Bindings/Plugin.h b/src/Bindings/Plugin.h index afc575b13..19947ff2e 100644 --- a/src/Bindings/Plugin.h +++ b/src/Bindings/Plugin.h @@ -66,6 +66,7 @@ public: virtual bool OnHandshake (cClientHandle & a_Client, const AString & a_Username) = 0; virtual bool OnHopperPullingItem (cWorld & a_World, cHopperEntity & a_Hopper, int a_DstSlotNum, cBlockEntityWithItems & a_SrcEntity, int a_SrcSlotNum) = 0; virtual bool OnHopperPushingItem (cWorld & a_World, cHopperEntity & a_Hopper, int a_SrcSlotNum, cBlockEntityWithItems & a_DstEntity, int a_DstSlotNum) = 0; + virtual bool OnDropSpense (cWorld & a_World, cDropSpenserEntity & a_DropSpenser, int a_SlotNum) = 0; virtual bool OnKilled (cEntity & a_Victim, TakeDamageInfo & a_TDI, AString & a_DeathMessage) = 0; virtual bool OnKilling (cEntity & a_Victim, cEntity * a_Killer, TakeDamageInfo & a_TDI) = 0; virtual bool OnLogin (cClientHandle & a_Client, UInt32 a_ProtocolVersion, const AString & a_Username) = 0; -- cgit v1.2.3