Interface PlayerProvider

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface PlayerProvider
Used when you want to provide your own player object instead of using the default one.

Sets with ConnectionManager.setPlayerProvider(PlayerProvider).

  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull Player
    createPlayer(@NotNull UUID uuid, @NotNull String username, @NotNull PlayerConnection connection)
    Creates a new Player object based on his connection data.
  • Method Details

    • createPlayer

      @NotNull @NotNull Player createPlayer(@NotNull @NotNull UUID uuid, @NotNull @NotNull String username, @NotNull @NotNull PlayerConnection connection)
      Creates a new Player object based on his connection data.

      Called once a client want to join the server and need to have an assigned player object.

      Parameters:
      uuid - the player UUID
      username - the player username
      connection - the player connection
      Returns:
      a newly create Player object