Interface FloodgateApi


public interface FloodgateApi
  • Method Details

    • getInstance

      static FloodgateApi 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

      Returns all the online Floodgate players.
    • getPlayerCount

      int getPlayerCount()
      Returns the number of Floodgate players who are currently online.
    • isFloodgatePlayer

      boolean isFloodgatePlayer(UUID uuid)
      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

      FloodgatePlayer getPlayer(UUID uuid)
      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

      UUID createJavaPlayerId(long xuid)
      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

      boolean isFloodgateId(UUID uuid)
      Checks if the uuid of the player has the createJavaPlayerId(long) format. This method can't validate a linked player uuid, since that doesn't equal the format. Use isFloodgatePlayer(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

      boolean sendForm(UUID uuid, org.geysermc.cumulus.form.Form form)
    • sendForm

      boolean sendForm(UUID uuid, org.geysermc.cumulus.form.util.FormBuilder<?,?,?> formBuilder)
    • transferPlayer

      boolean transferPlayer(UUID uuid, String address, int port)
    • getXuidFor

      CompletableFuture<Long> getXuidFor(String gamertag)
      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

      default CompletableFuture<UUID> getUuidFor(String gamertag)
      Get the xuid of the player that has the given gamertag. It does the same thing as getXuidFor(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

      CompletableFuture<String> getGamertagFor(long xuid)
      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

      default FloodgateEventBus getEventBus()
    • getPlayerLink

      default PlayerLink getPlayerLink()
      Returns the instance that manages all the linking.
    • unsafe

      Unsafe unsafe()