aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2019-07-14 13:23:38 +0200
committerGitHub <noreply@github.com>2019-07-14 13:23:38 +0200
commit47492386ece5b016a7a0ed06d6a44cc7d60adb55 (patch)
tree186d5650989663e4fb1acb801212936eb6d7d468 /doc
parent0c319469439237ba0db31ccbffeef06e2f5ab45f (diff)
downloadminetest-47492386ece5b016a7a0ed06d6a44cc7d60adb55.tar.gz
minetest-47492386ece5b016a7a0ed06d6a44cc7d60adb55.tar.bz2
minetest-47492386ece5b016a7a0ed06d6a44cc7d60adb55.zip
Docs: Clarify where to check for 'protection_bypass' (#8675)
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt16
1 files changed, 7 insertions, 9 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index b25c4ec9d..2650bfedf 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -4856,15 +4856,13 @@ Misc.
* `minetest.decode_base64(string)`: returns string
* Decodes a string encoded in base64.
* `minetest.is_protected(pos, name)`: returns boolean
- * Returns true, if player `name` shouldn't be able to dig at `pos` or do
- other actions, definable by mods, due to some mod-defined ownership-like
- concept.
- * Returns false or nil, if the player is allowed to do such actions.
- * `name` will be "" for non-players or unknown players.
- * This function should be overridden by protection mods and should be used
- to check if a player can interact at a position.
- * This function should call the old version of itself if the position is
- not protected by the mod.
+ * Returning `true` restricts the player `name` from modifying (i.e. digging,
+ placing) the node at position `pos`.
+ * `name` will be `""` for non-players or unknown players.
+ * This function should be overridden by protection mods. It is highly
+ recommended to grant access to players with the `protection_bypass` privilege.
+ * Cache and call the old version of this function if the position is
+ not protected by the mod. This will allow using multiple protection mods.
* Example:
local old_is_protected = minetest.is_protected