mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-07 19:31:37 +01:00
Added PlayerProvider comment
This commit is contained in:
parent
eff5d0b5e0
commit
f8bbc30435
@ -255,7 +255,7 @@ public final class ConnectionManager {
|
|||||||
* @param connection the new player connection
|
* @param connection the new player connection
|
||||||
*/
|
*/
|
||||||
public void createPlayer(UUID uuid, String username, PlayerConnection connection) {
|
public void createPlayer(UUID uuid, String username, PlayerConnection connection) {
|
||||||
final Player player = getPlayerProvider().getPlayer(uuid, username, connection);
|
final Player player = getPlayerProvider().createPlayer(uuid, username, connection);
|
||||||
createPlayer(player);
|
createPlayer(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,5 +7,14 @@ import java.util.UUID;
|
|||||||
|
|
||||||
@FunctionalInterface
|
@FunctionalInterface
|
||||||
public interface PlayerProvider {
|
public interface PlayerProvider {
|
||||||
Player getPlayer(UUID uuid, String username, PlayerConnection connection);
|
|
||||||
|
/**
|
||||||
|
* Should create a new {@link Player} object based on his data
|
||||||
|
*
|
||||||
|
* @param uuid the player {@link UUID}
|
||||||
|
* @param username the player username
|
||||||
|
* @param connection the player connection
|
||||||
|
* @return a newly create {@link Player} object
|
||||||
|
*/
|
||||||
|
Player createPlayer(UUID uuid, String username, PlayerConnection connection);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user