summaryrefslogtreecommitdiffstats
path: root/MCServer
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-03-29 23:05:17 +0100
committermadmaxoft <github@xoft.cz>2014-03-29 23:05:17 +0100
commit47a427d3dc1aafa1de5d55faa60e666e64ba7bd3 (patch)
tree3d9e203397178a6874b0430773731693cbd03ab6 /MCServer
parentNetherFortGen: Added several more prefabs. (diff)
parentcPrefab now uses a struct for block type definition in CharMap. (diff)
downloadcuberite-47a427d3dc1aafa1de5d55faa60e666e64ba7bd3.tar
cuberite-47a427d3dc1aafa1de5d55faa60e666e64ba7bd3.tar.gz
cuberite-47a427d3dc1aafa1de5d55faa60e666e64ba7bd3.tar.bz2
cuberite-47a427d3dc1aafa1de5d55faa60e666e64ba7bd3.tar.lz
cuberite-47a427d3dc1aafa1de5d55faa60e666e64ba7bd3.tar.xz
cuberite-47a427d3dc1aafa1de5d55faa60e666e64ba7bd3.tar.zst
cuberite-47a427d3dc1aafa1de5d55faa60e666e64ba7bd3.zip
Diffstat (limited to 'MCServer')
-rw-r--r--MCServer/Plugins/APIDump/Hooks/OnProjectileHitBlock.lua24
-rw-r--r--MCServer/Plugins/APIDump/Hooks/OnProjectileHitEntity.lua25
2 files changed, 49 insertions, 0 deletions
diff --git a/MCServer/Plugins/APIDump/Hooks/OnProjectileHitBlock.lua b/MCServer/Plugins/APIDump/Hooks/OnProjectileHitBlock.lua
new file mode 100644
index 000000000..1588d420c
--- /dev/null
+++ b/MCServer/Plugins/APIDump/Hooks/OnProjectileHitBlock.lua
@@ -0,0 +1,24 @@
+return
+{
+ HOOK_PROJECTILE_HIT_BLOCK =
+ {
+ CalledWhen = "A projectile hits a solid block.",
+ DefaultFnName = "OnProjectileHitBlock", -- also used as pagename
+ Desc = [[
+ This hook is called when a {{cProjectileEntity|projectile}} hits a solid block..
+ ]],
+ Params =
+ {
+ { Name = "ProjectileEntity", Type = "{{cProjectileEntity}}", Notes = "The projectile that hit an entity." },
+ },
+ Returns = [[
+ If the function returns false or no value, the next plugin's callback is called. If the function
+ returns true, no other callback is called for this event and the projectile flies through block..
+ ]],
+ }, -- HOOK_PROJECTILE_HIT_BLOCK
+}
+
+
+
+
+
diff --git a/MCServer/Plugins/APIDump/Hooks/OnProjectileHitEntity.lua b/MCServer/Plugins/APIDump/Hooks/OnProjectileHitEntity.lua
new file mode 100644
index 000000000..dd949fb46
--- /dev/null
+++ b/MCServer/Plugins/APIDump/Hooks/OnProjectileHitEntity.lua
@@ -0,0 +1,25 @@
+return
+{
+ HOOK_PROJECTILE_HIT_ENTITY =
+ {
+ CalledWhen = "A projectile hits another entity.",
+ DefaultFnName = "OnProjectileHitEntity", -- also used as pagename
+ Desc = [[
+ This hook is called when a {{cProjectileEntity|projectile}} hits another entity.
+ ]],
+ Params =
+ {
+ { Name = "ProjectileEntity", Type = "{{cProjectileEntity}}", Notes = "The projectile that hit an entity." },
+ { Name = "Entity", Type = "{{cEntity}}", Notes = "The entity wich was hit." },
+ },
+ Returns = [[
+ If the function returns false or no value, the next plugin's callback is called. If the function
+ returns true, no other callback is called for this event and the projectile flies through the entity.
+ ]],
+ }, -- HOOK_PROJECTILE_HIT_ENTITY
+}
+
+
+
+
+