From bea38a116a441940c0be71fee42405f7b15c784a Mon Sep 17 00:00:00 2001 From: est31 Date: Sun, 8 Feb 2015 01:38:05 +0100 Subject: Add //deleteblocks command --- worldedit_commands/init.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'worldedit_commands/init.lua') diff --git a/worldedit_commands/init.lua b/worldedit_commands/init.lua index 424082f..e97f304 100644 --- a/worldedit_commands/init.lua +++ b/worldedit_commands/init.lua @@ -277,6 +277,21 @@ minetest.register_chatcommand("/volume", { end, }) +minetest.register_chatcommand("/deleteblocks", { + params = "", + description = "remove all MapBlocks (16x16x16) containing the selected area from the map", + privs = {worldedit=true}, + func = safe_region(function(name, param) + local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name] + local success = minetest.delete_area(pos1, pos2) + if success then + worldedit.player_notify(name, "Area deleted.") + else + worldedit.player_notify(name, "There was an error during deletion of the area.") + end + end), +}) + minetest.register_chatcommand("/set", { params = "", description = "Set the current WorldEdit region to ", -- cgit v1.2.3