summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/HookNotify
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/HookNotify/HookNotify.lua12
1 files changed, 10 insertions, 2 deletions
diff --git a/MCServer/Plugins/HookNotify/HookNotify.lua b/MCServer/Plugins/HookNotify/HookNotify.lua
index 519d837fe..9bae91d3c 100644
--- a/MCServer/Plugins/HookNotify/HookNotify.lua
+++ b/MCServer/Plugins/HookNotify/HookNotify.lua
@@ -74,9 +74,17 @@ end
function OnBlockToPickups(...)
- LOG("************************");
LogHook("OnBlockToPickups", unpack(arg));
- LOG("========================");
+ local World, Digger, BlockX, BlockY, BlockZ, BlockType, BlockMeta, Pickups = unpack(arg);
+ if (Pickups ~= nil) then
+ local Name = "NULL";
+ if (Digger ~= nil) then
+ Name = Digger:GetName()
+ end
+ LOG("Got cItems from " .. Name .. ", trying to manipulate them.");
+ Pickups:Add(cItem:new(E_ITEM_DIAMOND_SHOVEL, 1));
+ LOG("Current size: " .. Pickups:Size());
+ end;
end;