diff options
-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
|