From f19c76545db9c7f0f5124fca5bdc314cf59afa92 Mon Sep 17 00:00:00 2001 From: Vanic Date: Fri, 13 Feb 2026 21:27:40 +0300 Subject: [PATCH] Add `ObjectRef:get_guid()` method annotations --- classes/ObjectRef.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/classes/ObjectRef.lua b/classes/ObjectRef.lua index f2ce680..2562f42 100644 --- a/classes/ObjectRef.lua +++ b/classes/ObjectRef.lua @@ -145,3 +145,12 @@ function ObjectRef:get_nametag_attributes() end --- } --- ``` function ObjectRef:set_nametag_attributes(attributes) end +--- Returns a global unique identifier (a string) +--- For players, this is a player name. +--- For Lua entities, this is a uniquely generated string, guaranteed not to collide with player names. +--- example: `@bGh3p2AbRE29Mb4biqX6OA` +--- GUIDs only use printable ASCII characters. +--- GUIDs persist between object reloads, and their format is guaranteed not to change. +--- Thus you can use the GUID to identify an object in a particular world online and offline. +--- @return string +function ObjectRef:get_guid()