Interface AdaptedServer

All Superinterfaces:
Handle

public interface AdaptedServer extends Handle
  • Method Details

    • getServerInfo

      AdaptedServerInfo getServerInfo()
      Gets the ServerInfo for this server
      Returns:
      The AdaptedServerInfo for this server
    • getName

      String getName()
      Gets the server's name
      Returns:
      the server's name
    • ping

      Pings the server and gets info back
      Returns:
      A CompletableFuture with the ServerPing
    • ping

      CompletableFuture<AdaptedServerPing> ping(boolean debug, QueueLogger logger)
    • getLastPing

      Optional<AdaptedServerPing> getLastPing()
    • canAccess

      boolean canAccess(AdaptedPlayer player)
      If the player can access the server Uses bungeecord's restricted server feature Will always return true on other platforms
      Parameters:
      player - The player to check
      Returns:
      False if the server is restricted and the player does not have permission to join.
    • getPlayers

      List<AdaptedPlayer> getPlayers()
    • getOfflineTime

      int getOfflineTime()
      Gets the number of seconds this server has been offline
      Returns:
      The number of seconds this server has been offline
    • canJoinFull

      default boolean canJoinFull(AdaptedPlayer player)
    • canJoinFull

      static boolean canJoinFull(AdaptedPlayer player, String serverName)
    • justWentOnline

      boolean justWentOnline()
    • isJoinable

      default boolean isJoinable(AdaptedPlayer player)
    • isJoinable

      default boolean isJoinable(AdaptedPlayer player, boolean ignoreFull)
    • isFull

      default boolean isFull()
    • isOnline

      default boolean isOnline()
      Gets if the last ping was successful (which almost always means the server is online)
      Returns:
      If the server is determined to be online or not
    • shouldWaitAfterOnline

      boolean shouldWaitAfterOnline()
    • getPlayerCount

      default int getPlayerCount()
      Gets the number of players currently online
      Returns:
      The number of players online
    • getMaxPlayers

      default int getMaxPlayers()
      Gets the maximum number of players that can join this server.
      Returns:
      The maximum number of players that can join this server
    • addPlayer

      default void addPlayer()
      Temporarily adds one player to the player count
    • isWhitelisted

      default boolean isWhitelisted()
      Checks if the spigot-side reports that the server is whitelisted
      Returns:
      True if the server is whitelisted
    • getWhitelistedPlayers

      default List<UUID> getWhitelistedPlayers()
      (if the server is whitelisted) returns the list of players that are whitelisted
      Returns:
      The list of players that are whitelisted