]> git.lizzy.rs Git - worldedit.git/commitdiff
Add //mark command and document it.
authorAnthony Zhang <azhang9@gmail.com>
Sun, 22 Jul 2012 19:22:36 +0000 (15:22 -0400)
committerAnthony Zhang <azhang9@gmail.com>
Sun, 22 Jul 2012 19:22:36 +0000 (15:22 -0400)
README.md
init.lua

index 000bfb25b7510cbedd3e94d827a15565128fe782..2d69c92bfb7ee89849ef9818ef96240057c0d0a9 100644 (file)
--- 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.
index a16d4d44c868b45bfeaadb62872fed307fbfaeb9..d5c4eb527497e4bc1c245c13c04de86e85a6d081 100644 (file)
--- a/init.lua
+++ b/init.lua
@@ -35,6 +35,17 @@ minetest.register_chatcommand("/reset", {
        end,\r
 })\r
 \r
+minetest.register_chatcommand("/mark", {\r
+       params = "",\r
+       description = "Show markers at the region positions",\r
+       privs = {worldedit=true},\r
+       func = function(name, param)\r
+               worldedit.mark_pos1(name)\r
+               worldedit.mark_pos2(name)\r
+               minetest.chat_send_player(name, "WorldEdit region marked")\r
+       end,\r
+})\r
+\r
 minetest.register_chatcommand("/pos1", {\r
        params = "",\r
        description = "Set WorldEdit region position 1 to the player's location",\r