From d9dc241e6fe669585d7c0b13d55818a22e1c76bc Mon Sep 17 00:00:00 2001
From: madmaxoft
Date: Sat, 23 Nov 2013 21:26:24 +0100
Subject: APIDump: The descriptions are read from multiple files.
All the files in the Classes subfolder are read for class descriptions, and in the Hooks subfolder for the hook descriptions.
---
.../Plugins/APIDump/Hooks/OnCollectingPickup.lua | 32 ++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 MCServer/Plugins/APIDump/Hooks/OnCollectingPickup.lua
(limited to 'MCServer/Plugins/APIDump/Hooks/OnCollectingPickup.lua')
diff --git a/MCServer/Plugins/APIDump/Hooks/OnCollectingPickup.lua b/MCServer/Plugins/APIDump/Hooks/OnCollectingPickup.lua
new file mode 100644
index 000000000..0a56df2c9
--- /dev/null
+++ b/MCServer/Plugins/APIDump/Hooks/OnCollectingPickup.lua
@@ -0,0 +1,32 @@
+return
+{
+ HOOK_COLLECTING_PICKUP =
+ {
+ CalledWhen = "Player is about to collect a pickup. Plugin can refuse / override behavior. ",
+ DefaultFnName = "OnCollectingPickup", -- also used as pagename
+ Desc = [[
+ This hook is called when a player is about to collect a pickup. Plugins may refuse the action.
+
+ Pickup collection happens within the world tick, so if the collecting is refused, it will be tried
+ again in the next world tick, as long as the player is within reach of the pickup.
+
+ FIXME: There is no OnCollectedPickup() callback.
+
+ FIXME: This callback is called even if the pickup doesn't fit into the player's inventory.
+ ]],
+ Params =
+ {
+ { Name = "Player", Type = "{{cPlayer}}", Notes = "The player who's collecting the pickup" },
+ { Name = "Pickup", Type = "{{cPickup}}", Notes = "The pickup being collected" },
+ },
+ Returns = [[
+ If the function returns false or no value, MCServer calls other plugins' callbacks and finally the
+ pickup is collected. If the function returns true, no other plugins are called for this event and
+ the pickup is not collected.
+ ]],
+ }, -- HOOK_COLLECTING_PICKUP
+}
+
+
+
+
--
cgit v1.2.3