summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Zhang <azhang9@gmail.com>2012-07-22 15:22:36 -0400
committerAnthony Zhang <azhang9@gmail.com>2012-07-22 15:22:36 -0400
commit9067f733494930bb7bff98932164a765d054fdda (patch)
tree856e2cb6526bf0913c08ba51706bd20984ef1574
parent5ce4517e66f00531103b866f3c9e8ad71191d9a9 (diff)
Add //mark command and document it.
-rw-r--r--README.md6
-rw-r--r--init.lua11
2 files changed, 17 insertions, 0 deletions
diff --git a/README.md b/README.md
index 000bfb2..2d69c92 100644
--- a/README.md
+++ b/README.md
@@ -35,6 +35,12 @@ Reset the region so that it is empty.
//reset
+### //mark
+
+Show markers at the region positions.
+
+ //mark
+
### //pos1
Set WorldEdit region position 1 to the player's location.
diff --git a/init.lua b/init.lua
index a16d4d4..d5c4eb5 100644
--- a/init.lua
+++ b/init.lua
@@ -35,6 +35,17 @@ minetest.register_chatcommand("/reset", {
end,
})
+minetest.register_chatcommand("/mark", {
+ params = "",
+ description = "Show markers at the region positions",
+ privs = {worldedit=true},
+ func = function(name, param)
+ worldedit.mark_pos1(name)
+ worldedit.mark_pos2(name)
+ minetest.chat_send_player(name, "WorldEdit region marked")
+ end,
+})
+
minetest.register_chatcommand("/pos1", {
params = "",
description = "Set WorldEdit region position 1 to the player's location",