diff options
author | sfan5 <sfan5@live.de> | 2016-10-12 19:38:41 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2016-10-12 19:38:41 +0200 |
commit | df6b54d2f57d1b50fee2f2b69f2118b266f65f37 (patch) | |
tree | 72166ecca7fa7e33c62e6a0e51d8be9f61e59d22 | |
parent | 5abe1cee3d430692b6ebfca960a8c1d277b71f94 (diff) |
Fix blowing up TNT near worldedit markers
-rw-r--r-- | worldedit_commands/mark.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/worldedit_commands/mark.lua b/worldedit_commands/mark.lua index 4062cae..7f880ea 100644 --- a/worldedit_commands/mark.lua +++ b/worldedit_commands/mark.lua @@ -153,7 +153,11 @@ minetest.register_entity(":worldedit:region_cube", { end
end,
on_punch = function(self, hitter)
- for _, entity in ipairs(worldedit.marker_region[self.player_name]) do
+ local markers = worldedit.marker_region[self.player_name]
+ if not markers then
+ return
+ end
+ for _, entity in ipairs(markers) do
entity:remove()
end
worldedit.marker_region[self.player_name] = nil
|