Interface PlayerManager


public interface PlayerManager
The players of the server: who is online, every known identity, and who may join.
Since:
0.1.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the service holding the players who are not allowed to connect.
    int
    Gets the current online player count.
    default Optional<? extends Player>
    get(String name)
    Looks up an online player by name, ignoring case.
    default Optional<? extends Player>
    get(UUID uuid)
    Looks up an online player by identity.
    Gets the directory of every identity the server knows of, connected or not.
    Collection<? extends Player>
    Gets the players currently connected.
    Gets the service holding the players allowed to connect while the whitelist is enforced.
  • Method Details

    • online

      Collection<? extends Player> online()
      Gets the players currently connected.
      Returns:
      the online players
      Since:
      0.1.0
    • count

      @Contract(pure=true) int count()
      Gets the current online player count.
      Returns:
      online player count
      Since:
      0.1.0
    • get

      default Optional<? extends Player> get(UUID uuid)
      Looks up an online player by identity.
      Parameters:
      uuid - the player identity
      Returns:
      the player, or empty if no player with that identity is connected
      Since:
      0.1.0
    • get

      default Optional<? extends Player> get(String name)
      Looks up an online player by name, ignoring case.
      Parameters:
      name - the player name
      Returns:
      the player, or empty if no player with that name is connected
      Since:
      0.1.0
    • offline

      Gets the directory of every identity the server knows of, connected or not.
      Returns:
      the offline player directory
      Since:
      0.1.0
    • bans

      @Contract(pure=true) BanManager bans()
      Gets the service holding the players who are not allowed to connect.
      Returns:
      the ban service
      Since:
      0.1.0
    • whitelist

      @Contract(pure=true) WhitelistManager whitelist()
      Gets the service holding the players allowed to connect while the whitelist is enforced.
      Returns:
      the whitelist service
      Since:
      0.1.0