Package net.minestom.server.network
Interface UuidProvider
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Used when you want to provide your own
UUID
object for players instead of using the default one.
-
Method Summary
Modifier and TypeMethodDescriptionprovide
(PlayerConnection playerConnection, String username) Called when a newUUID
is requested.
-
Method Details
-
provide
Called when a newUUID
is requested.The
UUID
does not need to be persistent between restart, but being sure that all players have a different one is good practice. Otherwise, undefined behavior can happen.- Parameters:
playerConnection
- the connection who requires a new unique idusername
- the username given by the connection- Returns:
- the new
UUID
for the player
-