Interface FPlayer

All Superinterfaces:
FEntity
All Known Implementing Classes:
FPlayerImpl

public interface FPlayer extends FEntity
This is a platform-dynamic, FlectonePulse player

For example, plugins using the Bukkit API can get an instance of the FPlayer object by simply using Entity.getUniqueId() and using FPlayerService's UUID getFPlayer method.

See Also:
  • Field Details

    • UNKNOWN_ID

      static final int UNKNOWN_ID
      The database id carried by the unknown player.
      See Also:
    • CONSOLE_ID

      static final int CONSOLE_ID
      The database id reserved for the console.
      See Also:
    • PLAYER_TYPE

      static final String PLAYER_TYPE
      The type of a real player.
      See Also:
    • CONSOLE_TYPE

      static final String CONSOLE_TYPE
      The type of the console.
      See Also:
    • INTEGRATION_TYPE

      static final String INTEGRATION_TYPE
      The type of a sender that came in through an integration such as Discord.
      See Also:
    • UNKNOWN

      static final FPlayer UNKNOWN
      The stand-in used when the real player cannot be determined.
  • Method Details

    • builder

      Starts building a player.
      Returns:
      a new builder
    • id

      Integer id()
      The database id.
      Returns:
      the id
    • isConsole

      boolean isConsole()
      Whether this is the console rather than a player.
      Returns:
      true for the console
    • isIntegration

      boolean isIntegration()
      Whether this sender came in through an integration.
      Returns:
      true for an integration sender
    • isOnline

      boolean isOnline()
      Whether the player is connected right now.
      Returns:
      true if online
    • ip

      String ip()
      The address the player connected from.
      Returns:
      the address, or null if it is not known
    • withName

      FPlayer withName(String name)
      Returns a copy with a different name.
      Parameters:
      name - the new name
      Returns:
      the copy
    • withUuid

      FPlayer withUuid(UUID uuid)
      Returns a copy with a different account id.
      Parameters:
      uuid - the new id
      Returns:
      the copy
    • withOnline

      FPlayer withOnline(boolean online)
      Returns a copy with a different online state.
      Parameters:
      online - the new state
      Returns:
      the copy
    • withId

      FPlayer withId(Integer id)
      Returns a copy with a different database id.
      Parameters:
      id - the new id
      Returns:
      the copy
    • withIp

      FPlayer withIp(String ip)
      Returns a copy with a different address.
      Parameters:
      ip - the new address
      Returns:
      the copy
    • toBuilder

      Starts a builder pre-filled with this player's values.
      Returns:
      the pre-filled builder
    • isUnknown

      default boolean isUnknown()
      Description copied from interface: FEntity
      Whether this is the stand-in returned by FEntity.unknown().
      Specified by:
      isUnknown in interface FEntity
      Returns:
      true if the entity is unknown