summaryrefslogtreecommitdiff
path: root/doc/lua_api.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r--doc/lua_api.txt26
1 files changed, 15 insertions, 11 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 56dc84d24..45a47c9ab 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -2544,6 +2544,19 @@ This is basically a reference to a C++ `ServerActiveObject`
* `set_properties(object property table)`
* `get_properties()`: returns object property table
* `is_player()`: returns true for players, false otherwise
+* `get_nametag_attributes()`
+ * returns a table with the attributes of the nametag of an object
+ * {
+ color = {a=0..255, r=0..255, g=0..255, b=0..255},
+ text = "",
+ }
+* `set_nametag_attributes(attributes)`
+ * sets the attributes of the nametag of an object
+ * `attributes`:
+ {
+ color = ColorSpec,
+ text = "My Nametag",
+ }
##### LuaEntitySAO-only (no-op for other objects)
* `setvelocity({x=num, y=num, z=num})`
@@ -2644,17 +2657,6 @@ This is basically a reference to a C++ `ServerActiveObject`
* in first person view
* in third person view (max. values `{x=-10/10,y=-10,15,z=-5/5}`)
* `get_eye_offset()`: returns offset_first and offset_third
-* `get_nametag_attributes()`
- * returns a table with the attributes of the nametag of the player
- * {
- color = {a=0..255, r=0..255, g=0..255, b=0..255},
- }
-* `set_nametag_attributes(attributes)`
- * sets the attributes of the nametag of the player
- * `attributes`:
- {
- color = ColorSpec,
- }
### `InvRef`
An `InvRef` is a reference to an inventory.
@@ -3232,6 +3234,8 @@ Definition tables
automatic_face_movement_dir = 0.0,
-- ^ automatically set yaw to movement direction; offset in degrees; false to disable
backface_culling = true, -- false to disable backface_culling for model
+ nametag = "", -- by default empty, for players their name is shown if empty
+ nametag_color = <color>, -- sets color of nametag as ColorSpec
}
### Entity definition (`register_entity`)