Package org.geysermc.floodgate.api
Interface FloodgateApi
public interface FloodgateApi
-
Method Summary
Modifier and TypeMethodDescriptioncreateJavaPlayerId(long xuid) Create a valid Java player uuid of a xuiddefault FloodgateEventBusgetGamertagFor(long xuid) Get the gamertag of the user that has the given xuid.static FloodgateApiReturns the Floodgate API instance.Get info about the given Bedrock playerintReturns the number of Floodgate players who are currently online.default PlayerLinkReturns the instance that manages all the linking.Returns the character(s) that will be added in front of a Bedrock player's name to prevent username duplicates.Returns all the online Floodgate players.default CompletableFuture<UUID>getUuidFor(String gamertag) Get the xuid of the player that has the given gamertag.getXuidFor(String gamertag) Get the xuid of the user that has the given gamertag.booleanisFloodgateId(UUID uuid) Checks if the uuid of the player has thecreateJavaPlayerId(long)format.booleanisFloodgatePlayer(UUID uuid) Method to determine if the given online player is a bedrock playerbooleanbooleanbooleanDeprecated.since Cumulus 1.1 and will be removed when Cumulus 2.0 releases.booleanDeprecated.since Cumulus 1.1 and will be removed when Cumulus 2.0 releases.booleantransferPlayer(UUID uuid, String address, int port) unsafe()
-
Method Details
-
getInstance
Returns the Floodgate API instance. -
getPlayerPrefix
String getPlayerPrefix()Returns the character(s) that will be added in front of a Bedrock player's name to prevent username duplicates. -
getPlayers
Collection<FloodgatePlayer> getPlayers()Returns all the online Floodgate players. -
getPlayerCount
int getPlayerCount()Returns the number of Floodgate players who are currently online. -
isFloodgatePlayer
Method to determine if the given online player is a bedrock player- Parameters:
uuid- The uuid of the online player- Returns:
- true if the given online player is a Bedrock player
-
getPlayer
Get info about the given Bedrock player- Parameters:
uuid- the uuid of the online Bedrock player- Returns:
- FloodgatePlayer if the given uuid is a Bedrock player
-
createJavaPlayerId
Create a valid Java player uuid of a xuid- Parameters:
xuid- the xuid that should be converted- Returns:
- the created uuid based of the given xuid
-
isFloodgateId
Checks if the uuid of the player has thecreateJavaPlayerId(long)format. This method can't validate a linked player uuid, since that doesn't equal the format. UseisFloodgatePlayer(UUID)if you want to include linked accounts.- Parameters:
uuid- the uuid to check- Returns:
- true if the given uuid has the correct format.
-
sendForm
-
sendForm
-
sendForm
Deprecated.since Cumulus 1.1 and will be removed when Cumulus 2.0 releases. Please use the new form classes instead. -
sendForm
Deprecated.since Cumulus 1.1 and will be removed when Cumulus 2.0 releases. Please use the new form classes instead. -
transferPlayer
-
getXuidFor
Get the xuid of the user that has the given gamertag.- Parameters:
gamertag- the gamertag of the player- Returns:
- the xuid of the player with the given gamertag, or null when there is no player with the given gamertag
-
getUuidFor
Get the xuid of the player that has the given gamertag. It does the same thing asgetXuidFor(String)except that this method will return the xuid in Floodgate uuid format instead of just a long- Parameters:
gamertag- the gamertag of the player- Returns:
- the xuid of the player with the given gamertag, or null when there is no player with the given gamertag
-
getGamertagFor
Get the gamertag of the user that has the given xuid.- Parameters:
xuid- the gamertag of the player- Returns:
- the gamertag of the player with the given xuid, or null when there is not player with the given xuid
-
getEventBus
-
getPlayerLink
Returns the instance that manages all the linking. -
unsafe
Unsafe unsafe()
-