What is the difference between the UUID of the client and the Client Id? https://github.com/pmmp/PocketMine-MP/blob/master/src/pocketmine/Player.php#L1904L1907 Also, which is better to use?
As far as I know: UUID: Kombination of CID, IP and name I think CID: The ID of the client (app) the player uses, it's saved somewhere in the /games/com.mojang/... folder and can easily be changed by the player
https://github.com/pmmp/PocketMine-MP/blob/master/src/pocketmine/Player.php#L251L261 If you aren't wrong, then what is the client Id?
The answer is in Player: PHP: /** * This might disappear in the future. * Please use getUniqueId() instead (IP + clientId + name combo, in the future it'll change to real UUID for online * auth) * * @deprecated * */ public function getClientId(){ return $this->randomClientId; } So GetClientId() is deprecated and currently returns a random string, and getUniqueId() returns what it says above, IP + clientId + name combo
$player->getClientId() returns the clientId send by the player, UUID is also sent by the player https://github.com/pmmp/PocketMine-MP/blob/master/src/pocketmine/Player.php#L1904 https://github.com/pmmp/PocketMine-MP/blob/master/src/pocketmine/Player.php#L1906 https://github.com/pmmp/PocketMine-...cketmine/network/protocol/LoginPacket.php#L67 https://github.com/pmmp/PocketMine-...cketmine/network/protocol/LoginPacket.php#L77 ClientId can be easily changed but i don't think UUID can be changed (correct me if im wrong )
UUID stands for "Universally Unique Identifier". It is unique for each player and profile that has been online on any server. It's used for recognizing a player online, and cannot be changed, even if the player changes their name (at least not usually anyway). The client ID however is just a long randomly generated number used to "identify" a player's MCPE client from everyone else's client. The problem with this however is that this client ID can be easily changed. This is done by modifying it in the game's files stored on your device. So in my opinion, it would be a better idea to use a player's UUID, although that's just my own thought.
UUID is even easier to change, as it's a combination of Name, IP and ClientID, you just have to change one of those and you have another UUID (yep, in MC Java Editon the UUID is unique to the account of the player and can't be changed, but not in PE)
The UUID is given via the Xbox account, unless you can access to Microsoft servers. You can't modify it.