summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorWuzzy <Wuzzy2@mail.ru>2020-05-26 02:11:19 +0200
committersfan5 <sfan5@live.de>2020-05-29 22:45:40 +0200
commit65a6a316d081d3951438bbbcfce74c9c65db407a (patch)
treeb063fae3fd4bb9d75be05905f6f53ae19982fb01 /doc
parent9a64a9fd9427fc3b62d4dc9bf1ca7c15477ebc5a (diff)
downloadminetest-65a6a316d081d3951438bbbcfce74c9c65db407a.tar.gz
minetest-65a6a316d081d3951438bbbcfce74c9c65db407a.tar.bz2
minetest-65a6a316d081d3951438bbbcfce74c9c65db407a.zip
Add minetest.is_creative_enabled
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index c4310aa5b..bb9df5373 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -5475,6 +5475,13 @@ Misc.
* `minetest.record_protection_violation(pos, name)`
* This function calls functions registered with
`minetest.register_on_protection_violation`.
+* `minetest.is_creative_enabled(name)`: returns boolean
+ * Returning `true` means that Creative Mode is enabled for player `name`.
+ * `name` will be `""` for non-players or if the player is unknown.
+ * This function should be overridden by Creative Mode-related mods to
+ implement a per-player Creative Mode.
+ * By default, this function returns `true` if the setting
+ `creative_mode` is `true` and `false` otherwise.
* `minetest.is_area_protected(pos1, pos2, player_name, interval)`
* Returns the position of the first node that `player_name` may not modify
in the specified cuboid between `pos1` and `pos2`.