summaryrefslogtreecommitdiff
path: root/WorldEdit API.md
diff options
context:
space:
mode:
authorAnthony Zhang <azhang9@gmail.com>2013-01-12 18:20:41 -0500
committerAnthony Zhang <azhang9@gmail.com>2013-01-12 18:20:41 -0500
commite2f1c4ef174443b2807aa94a209261546bbf19fb (patch)
tree8e81c6141d2b7823b1112308fbddcfed1b2df2b1 /WorldEdit API.md
parentc27ab877f1bc8afde76f9cfe11c7880cec9bdda2 (diff)
Add //homogenize, //lua, and //luatransform commands, as well as their documentation.
Diffstat (limited to 'WorldEdit API.md')
-rw-r--r--WorldEdit API.md18
1 files changed, 17 insertions, 1 deletions
diff --git a/WorldEdit API.md b/WorldEdit API.md
index a0a1a60..0b383ed 100644
--- a/WorldEdit API.md
+++ b/WorldEdit API.md
@@ -182,4 +182,20 @@ Returns the number of nodes saved.
Loads the nodes and meta from `file` to position `pos1`.
-Returns the number of nodes loaded. \ No newline at end of file
+Returns the number of nodes loaded.
+
+Code
+----
+Contained in code.lua, this module allows arbitrary Lua code to be used with WorldEdit.
+
+### error = worldedit.lua(code)
+
+Executes `code` as a Lua chunk in the global namespace.
+
+Returns an error if the code fails or nil otherwise.
+
+### error = worldedit.luatransform(pos1, pos2, code)
+
+Executes `code` as a Lua chunk in the global namespace with the variable pos available, for each node in a region defined by positions `pos1` and `pos2`.
+
+Returns an error if the code fails or nil otherwise. \ No newline at end of file