mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 18:41:09 +01:00
Basic mcl_gamemode documentation
This commit is contained in:
parent
0da1822d26
commit
093d55861c
1 changed files with 27 additions and 0 deletions
27
mods/PLAYER/mcl_gamemode/API.md
Normal file
27
mods/PLAYER/mcl_gamemode/API.md
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
# `mcl_gamemode`
|
||||||
|
|
||||||
|
## `mcl_gamemode.gamemodes`
|
||||||
|
|
||||||
|
List of availlable gamemodes.
|
||||||
|
|
||||||
|
Currently `{"survival", "creative"}`
|
||||||
|
|
||||||
|
## `mcl_gamemode.get_gamemode(player)`
|
||||||
|
|
||||||
|
Get the player's gamemode.
|
||||||
|
|
||||||
|
Returns "survival" or "creative".
|
||||||
|
|
||||||
|
## `mcl_gamemode.set_gamemode(player, gamemode)`
|
||||||
|
|
||||||
|
Set the player's gamemode.
|
||||||
|
|
||||||
|
gamemode: "survival" or "creative"
|
||||||
|
|
||||||
|
## `mcl_gamemode.register_on_gamemode_change(function(player, old_gamemode, new_gamemode))`
|
||||||
|
|
||||||
|
Register a function that will be called when `mcl_gamemode.set_gamemode` is called.
|
||||||
|
|
||||||
|
## `mcl_gamemode.registered_on_gamemode_change`
|
||||||
|
|
||||||
|
Map of registered on_gamemode_change.
|
Loading…
Reference in a new issue