summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-12-21 12:22:46 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-12-21 12:22:46 +0100
commit999014170da0419c8b46cee775e3afd5b0dcf791 (patch)
tree2ad8b24276084762fbda712b8a487fd9eda0ef86
parentAdded PrimaryServerVersion to the webadmin (patch contributed by STR_Warrior) (diff)
downloadcuberite-999014170da0419c8b46cee775e3afd5b0dcf791.tar
cuberite-999014170da0419c8b46cee775e3afd5b0dcf791.tar.gz
cuberite-999014170da0419c8b46cee775e3afd5b0dcf791.tar.bz2
cuberite-999014170da0419c8b46cee775e3afd5b0dcf791.tar.lz
cuberite-999014170da0419c8b46cee775e3afd5b0dcf791.tar.xz
cuberite-999014170da0419c8b46cee775e3afd5b0dcf791.tar.zst
cuberite-999014170da0419c8b46cee775e3afd5b0dcf791.zip
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/Debuggers/Debuggers.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua
index 6e39e6393..5550f0335 100644
--- a/MCServer/Plugins/Debuggers/Debuggers.lua
+++ b/MCServer/Plugins/Debuggers/Debuggers.lua
@@ -14,6 +14,7 @@ function Initialize(Plugin)
PluginManager = cRoot:Get():GetPluginManager()
PluginManager:AddHook(Plugin, cPluginManager.E_PLUGIN_BLOCK_PLACE)
+ PluginManager:AddHook(Plugin, cPluginManager.HOOK_TAKE_DAMAGE)
LOG("Initialized " .. Plugin:GetName() .. " v." .. Plugin:GetVersion())
return true
@@ -67,3 +68,13 @@ end
+
+function OnTakeDamage(Receiver, TDI)
+ -- Receiver is cPawn
+ -- TDI is TakeDamageInfo
+
+ LOG(Receiver:GetClass() .. " was dealt RawDamage " .. TDI.RawDamage .. ", FinalDamage " .. TDI.FinalDamage .. " (that is, " .. (TDI.RawDamage - TDI.FinalDamage) .. " HPs covered by armor)");
+end
+
+
+