]> git.lizzy.rs Git - minetest.git/blobdiff - doc/client_lua_api.txt
ContentDB: Order installed content first (#10864)
[minetest.git] / doc / client_lua_api.txt
index 3b0046b4f9517e004e2733251ba00006fe21c824..098596481f82b310631dc825caf019ca163eaac4 100644 (file)
@@ -620,7 +620,7 @@ Helper functions
 * `minetest.is_yes(arg)`
     * returns whether `arg` can be interpreted as yes
 * `minetest.is_nan(arg)`
-    * returns true true when the passed number represents NaN.
+    * returns true when the passed number represents NaN.
 * `table.copy(table)`: returns a table
     * returns a deep copy of `table`
 
@@ -686,6 +686,11 @@ Call these functions only at load time!
     * Adds definition to minetest.registered_chatcommands
 * `minetest.unregister_chatcommand(name)`
     * Unregisters a chatcommands registered with register_chatcommand.
+* `minetest.register_on_chatcommand(function(command, params))`
+    * Called always when a chatcommand is triggered, before `minetest.registered_chatcommands`
+      is checked to see if that the command exists, but after the input is parsed.
+    * Return `true` to mark the command as handled, which means that the default
+      handlers will be prevented.
 * `minetest.register_on_death(function())`
     * Called when the local player dies
 * `minetest.register_on_hp_modification(function(hp))`
@@ -996,6 +1001,7 @@ Please do not try to access the reference until the camera is initialized, other
 
 ### LocalPlayer
 An interface to retrieve information about the player.
+This object will only be available after the client is initialized. Earlier accesses will yield a `nil` value.
 
 Methods:
 
@@ -1100,8 +1106,8 @@ Methods:
        aux1 = boolean,
        sneak = boolean,
        zoom = boolean,
-       LMB = boolean,
-       RMB = boolean,
+       dig = boolean,
+       place = boolean,
     }
 ```