Skip to content

Commit 9f9e49b

Browse files
fluxionaryMoNTE48
authored andcommitted
Make //clearobjects remove unknown objects (#244)
1 parent ef1163a commit 9f9e49b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

worldedit/manipulations.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ function worldedit.clear_objects(pos1, pos2)
656656
return false
657657
end
658658
local entity = obj:get_luaentity()
659-
return not entity or not entity.name:find("^worldedit:")
659+
return not (entity and entity.name:find("^worldedit:"))
660660
end
661661

662662
-- Offset positions to include full nodes (positions are in the center of nodes)
@@ -703,4 +703,3 @@ function worldedit.clear_objects(pos1, pos2)
703703
end
704704
return count
705705
end
706-

0 commit comments

Comments
 (0)