Interface BedwarsAPI


public interface BedwarsAPI
  • Method Details

    • getGames

      List<Game> getGames()
      Returns:
      List of available games
    • isGameWithNameExists

      boolean isGameWithNameExists(String name)
      Parameters:
      name - Name of game
      Returns:
      true if game is exists
    • getGameByName

      Game getGameByName(String name)
      Parameters:
      name - Name of game
      Returns:
      Game or null if game is not exists
    • getGameOfPlayer

      Game getGameOfPlayer(org.bukkit.entity.Player player)
      Parameters:
      player - Player
      Returns:
      Player's Game or null if player isn't in game
    • getGameWithHighestPlayers

      Game getGameWithHighestPlayers()
      Returns:
      Free game that has highest players in it
    • getGameWithLowestPlayers

      Game getGameWithLowestPlayers()
      Returns:
      Free game that has lowest players in it
    • isPlayerPlayingAnyGame

      boolean isPlayerPlayingAnyGame(org.bukkit.entity.Player player)
      Parameters:
      player - Player
      Returns:
      true if player is in any game
    • getItemSpawnerTypes

      List<ItemSpawnerType> getItemSpawnerTypes()
      Returns:
      List of existing spawner types
    • isItemSpawnerTypeRegistered

      boolean isItemSpawnerTypeRegistered(String name)
      Parameters:
      name - Name of item spawner type
      Returns:
      boolean Is spawner type registered
    • getItemSpawnerTypeByName

      ItemSpawnerType getItemSpawnerTypeByName(String name)
      Parameters:
      name - Name of item spawner type
      Returns:
      ItemSpawnerType by name or null if type isn't exists
    • isEntityInGame

      boolean isEntityInGame(org.bukkit.entity.Entity entity)
      Parameters:
      entity - Entity
      Returns:
      true if entity is in game
    • getGameOfEntity

      Game getGameOfEntity(org.bukkit.entity.Entity entity)
      Parameters:
      entity - Entity
      Returns:
      Game of entity or null
    • getFirstWaitingGame

      Game getFirstWaitingGame()
      Returns:
      Game in waiting state or null
    • getFirstRunningGame

      Game getFirstRunningGame()
      Returns:
      Game in running state or null
    • registerEntityToGame

      void registerEntityToGame(org.bukkit.entity.Entity entity, Game game)
      Parameters:
      entity - Entity
      game - Game
    • unregisterEntityFromGame

      void unregisterEntityFromGame(org.bukkit.entity.Entity entity)
      Parameters:
      entity - Entity
    • getPluginVersion

      String getPluginVersion()
      Returns:
      String of Bedwars Version
    • getColorChanger

      ColorChanger getColorChanger()
      Returns:
      Color changer for coloring ItemStacks
    • getHubServerName

      String getHubServerName()
      Returns:
      hub server name from config
    • getStatisticsManager

      PlayerStatisticsManager getStatisticsManager()
      Returns:
      PlayerStatisticsManager if statistics are enabled; otherwise null
    • getInstance

      static BedwarsAPI getInstance()
      Returns:
      Bedwars instance