1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-21 18:11:11 +00:00

Add minetest.is_creative_enabled

This commit is contained in:
Wuzzy 2020-05-26 02:11:19 +02:00 committed by sfan5
parent 9a64a9fd94
commit 65a6a316d0
5 changed files with 17 additions and 10 deletions

View file

@ -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`.