From 093d55861ca47410b8c73419b6a49a46086f6720 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Sat, 10 Sep 2022 18:38:46 +0200 Subject: [PATCH] Basic mcl_gamemode documentation --- mods/PLAYER/mcl_gamemode/API.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 mods/PLAYER/mcl_gamemode/API.md diff --git a/mods/PLAYER/mcl_gamemode/API.md b/mods/PLAYER/mcl_gamemode/API.md new file mode 100644 index 000000000..24651301e --- /dev/null +++ b/mods/PLAYER/mcl_gamemode/API.md @@ -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.