Player: remove note about bans from getUniqueId()

while it's true that you might be able to skip the CPU waste from verifying a player's login just to find out that they are banned, this is generally a minority case anyway, so it doesn't make a lot of difference overall. This additional note is essentially a recommendation premature optimisation, which will likely lead to people making security mistakes.
This commit is contained in:
Dylan K. Taylor 2021-07-22 22:14:14 +01:00
parent 61528393c2
commit 3af18917f0
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -490,8 +490,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
* non-XBL players can fake their UUIDs.
*
* 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
* time (since it doesn't make sense to impersonate a banned player anyway).
* authenticated, and any of their data might be faked.
*/
public function getUniqueId() : ?UUID{
return parent::getUniqueId();