Cuberite Forum

Full Version: [SOLVED] Player:GetUniqueID vs Player:GetUUID
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When I must to use Player:GetUniqueID and Player:GetUUID?
cPlayer:GetUniqueID returns the ID of the entity of the player, while GetUUID returns the (mojang) UUID of the player. The UUID is from the mojang servers if the server is in online mode. Otherwise it is generated.

UniqueID is only valid while the player is logged in. When the server restarts or the player logs of he gets a different Unique ID.
GetUniqueID is a server internal ID, which is unique across entities, This is primarily used for apis that work with entities. UUID returns the player UUID, (which is not necessarily unique) which only players have, and is persistent across multiple logins. It is primarily used for the login apis.