All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.minestom.server.network.PlayerProvider Maven / Gradle / Ivy

There is a newer version: 7320437640
Show newest version
package net.minestom.server.network;

import net.minestom.server.entity.Player;
import net.minestom.server.network.player.PlayerConnection;
import org.jetbrains.annotations.NotNull;

import java.util.UUID;

/**
 * Used when you want to provide your own player object instead of using the default one.
 * 

* Sets with {@link ConnectionManager#setPlayerProvider(PlayerProvider)}. */ @FunctionalInterface public interface PlayerProvider { /** * Creates a new {@link Player} object based on his connection data. *

* Called once a client want to join the server and need to have an assigned player object. * * @param uuid the player {@link UUID} * @param username the player username * @param connection the player connection * @return a newly create {@link Player} object */ @NotNull Player createPlayer(@NotNull UUID uuid, @NotNull String username, @NotNull PlayerConnection connection); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy