mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 01:51:51 +00:00
Player: rewrite the confusing documentation of getUniqueId()
This commit is contained in:
parent
59b8453228
commit
61528393c2
@ -483,19 +483,15 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the player's UUID. This should be preferred over their Xbox user ID (XUID) because UUID is a standard
|
* Returns the player's UUID. This should be the preferred method to identify a player.
|
||||||
* format which will never change, and all players will have one regardless of whether they are logged into Xbox
|
* It does not change if the player changes their username.
|
||||||
* Live.
|
|
||||||
*
|
*
|
||||||
* The UUID is comprised of:
|
* All players will have a UUID, regardless of whether they are logged into Xbox Live or not. However, note that
|
||||||
* - when logged into XBL: a hash of their XUID (and as such will not change for the lifetime of the XBL account)
|
* non-XBL players can fake their UUIDs.
|
||||||
* - when NOT logged into XBL: a hash of their name + clientID + secret device ID.
|
|
||||||
*
|
*
|
||||||
* WARNING: UUIDs of players **not logged into Xbox Live** CAN BE FAKED and SHOULD NOT be trusted!
|
* WARNING: DO NOT trust this before PlayerLoginEvent. Before PlayerLoginEvent, the player hasn't yet been
|
||||||
*
|
* authenticated, and any of their data might be faked. However, you can use it for things like checking bans at any
|
||||||
* (In the olden days this method used to return a fake UUID computed by the server, which was used by plugins such
|
* time (since it doesn't make sense to impersonate a banned player anyway).
|
||||||
* as SimpleAuth for authentication. This is NOT SAFE anymore as this UUID is now what was given by the client, NOT
|
|
||||||
* a server-computed UUID.)
|
|
||||||
*/
|
*/
|
||||||
public function getUniqueId() : ?UUID{
|
public function getUniqueId() : ?UUID{
|
||||||
return parent::getUniqueId();
|
return parent::getUniqueId();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user