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 newUUIDis requested.
-
Method Details
-
provide
Called when a newUUIDis requested.The
UUIDdoes 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
UUIDfor the player
-