mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-16 12:21:32 +01:00
Created Player UUID (markdown)
parent
704dcb680a
commit
cacfda083c
11
Player-UUID.md
Normal file
11
Player-UUID.md
Normal file
@ -0,0 +1,11 @@
|
||||
As UUID implies, it has to be a unique identifier. By default, this identifier is generated randomly at the connection.
|
||||
|
||||
What you normally want is a unique identifier which will stay the same even after a disconnection or a server shutdown, which could be obtained by getting the Mojang UUID of the player using their API, or having your custom UUID linked to the registration system on your website, we do not implement that by default so you are free to choose what you prefer.
|
||||
|
||||
Here how to register your own UUID provider:
|
||||
```java
|
||||
connectionManager.setUuidProvider(playerConnection -> {
|
||||
// This method will be called at players connection to set their UUID
|
||||
return UUID.randomUUID(); /* Set here your custom UUID registration system */
|
||||
});
|
||||
```
|
Loading…
Reference in New Issue
Block a user