diff --git a/worldedit/manipulations.lua b/worldedit/manipulations.lua index ce13b46..f45aa1e 100644 --- a/worldedit/manipulations.lua +++ b/worldedit/manipulations.lua @@ -644,7 +644,7 @@ function worldedit.clear_objects(pos1, pos2) return false end local entity = obj:get_luaentity() - return not entity or not entity.name:find("^worldedit:") + return not (entity and entity.name:find("^worldedit:")) end -- Offset positions to include full nodes (positions are in the center of nodes) @@ -691,4 +691,3 @@ function worldedit.clear_objects(pos1, pos2) end return count end -