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 TypeMethodDescription@NotNull UUID
provide
(@NotNull PlayerConnection playerConnection, @NotNull String username) Called when a newUUID
is requested.
-
Method Details
-
provide
@NotNull @NotNull UUID provide(@NotNull @NotNull PlayerConnection playerConnection, @NotNull @NotNull String username) 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
-