Interface FPlayer
- All Superinterfaces:
FEntity
- All Known Implementing Classes:
FPlayerImpl
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 method.
UUID getFPlayer
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe database id reserved for the console.static final StringThe type of the console.static final StringThe type of a sender that came in through an integration such as Discord.static final StringThe type of a real player.static final FPlayerThe stand-in used when the real player cannot be determined.static final intThe database id carried by the unknown player.Fields inherited from interface FEntity
UNKNOWN_NAME, UNKNOWN_TYPE, UNKNOWN_UUID -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Starts building a player.id()The database id.ip()The address the player connected from.booleanWhether this is the console rather than a player.booleanWhether this sender came in through an integration.booleanisOnline()Whether the player is connected right now.default booleanWhether this is the stand-in returned byFEntity.unknown().Starts a builder pre-filled with this player's values.Returns a copy with a different database id.Returns a copy with a different address.Returns a copy with a different name.withOnline(boolean online) Returns a copy with a different online state.Returns a copy with a different account id.Methods inherited from interface FEntity
name, showEntityName, type, uuid
-
Field Details
-
UNKNOWN_ID
static final int UNKNOWN_IDThe database id carried by the unknown player.- See Also:
-
CONSOLE_ID
static final int CONSOLE_IDThe database id reserved for the console.- See Also:
-
PLAYER_TYPE
-
CONSOLE_TYPE
-
INTEGRATION_TYPE
The type of a sender that came in through an integration such as Discord.- See Also:
-
UNKNOWN
The stand-in used when the real player cannot be determined.
-
-
Method Details
-
builder
-
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
-
withName
-
withUuid
-
withOnline
Returns a copy with a different online state.- Parameters:
online- the new state- Returns:
- the copy
-
withId
-
withIp
-
toBuilder
FPlayerImpl.FPlayerImplBuilder toBuilder()Starts a builder pre-filled with this player's values.- Returns:
- the pre-filled builder
-
isUnknown
default boolean isUnknown()Description copied from interface:FEntityWhether this is the stand-in returned byFEntity.unknown().
-