summaryrefslogtreecommitdiff
path: root/api.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2016-05-23 16:32:22 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2016-05-23 16:32:22 +0100
commitba976207597654fd062352dbbb3f0f9c0943e3ae (patch)
tree6b5324b58923693e1445e444898e01db1c2b195f /api.lua
parent1a53844f610ed59a2804eabbcdff4576da340858 (diff)
added fix for when mod profiling enabled and mob is punched
Diffstat (limited to 'api.lua')
-rw-r--r--api.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/api.lua b/api.lua
index 101ffbc..ab2b37c 100644
--- a/api.lua
+++ b/api.lua
@@ -1,5 +1,5 @@
--- Mobs Api (12th May 2016)
+-- Mobs Api (23rd May 2016)
mobs = {}
mobs.mod = "redo"
@@ -1756,6 +1756,12 @@ end
local mob_punch = function(self, hitter, tflp, tool_capabilities, dir)
+ -- error checking when mod profiling is enabled
+ if not tool_capabilities then
+ print ("[MOBS] mod profiling enabled, damage not enabled")
+ return
+ end
+
-- direction error check
dir = dir or {x = 0, y = 0, z = 0}