]> git.lizzy.rs Git - worldedit.git/blobdiff - WorldEdit API.md
Version information is now available via the API.
[worldedit.git] / WorldEdit API.md
index 22441d297cdb16a424c9823557888ea3b68fec3d..4169cbe5d91e745b31e64d15aa454c34297e6aa0 100644 (file)
@@ -6,13 +6,24 @@ If needed, individual modules such as visualization.lua can be removed without a
 \r
 For more information, see the [README](README.md).\r
 \r
+General\r
+-------\r
+\r
+### value = worldedit.version\r
+\r
+Contains the current version of WorldEdit in a table of the form `{major=MAJOR_INTEGER, minor=MINOR_INTEGER}`, where `MAJOR_INTEGER` is the major version (the number before the period) as an integer, and `MINOR_INTEGER` is the minor version (the number after the period) as an integer. This is intended for version checking purposes.\r
+\r
+### value = worldedit.version_string\r
+\r
+Contains the current version of WorldEdit in the form of a string `"MAJOR_INTEGER.MINOR_INTEGER"`, where `MAJOR_INTEGER` is the major version (the number before the period) as an integer, and `MINOR_INTEGER` is the minor version (the number after the period) as an integer. This is intended for display purposes.\r
+\r
 Manipulations\r
 -------------\r
 Contained in manipulations.lua, this module allows several node operations to be applied over a region.\r
 \r
 ### count = worldedit.set(pos1, pos2, nodename)\r
 \r
-Sets a region defined by positions `pos1` and `pos2` to `nodename`. To clear to region, use "air" as the value of `nodename`.\r
+Sets a region defined by positions `pos1` and `pos2` to `nodename`. To clear a region, use "air" as the value of `nodename`.\r
 \r
 Returns the number of nodes set.\r
 \r