API

If you are a developer and want to integrate your own plugins with The Bridge, you can use its API. It allows you to safely access game information without the risk of breaking the plugin.

How to Access the API: First, you need to get the API instance from Bukkit's ServicesManager.

Java

Available API Methods (BridgeAPI.kt)

  • isPlayerInGame(player): Returns true if a player is in a Bridge game.

  • getPlayerGame(player): Gets the BridgeGame object instance the player is in. Returns null if they are not in a game.

  • getPlayerTeam(player): Returns a player's team (Team.RED or Team.BLUE).

  • getPlayerStats(playerUUID): Gets a player's persistent stats (PlayerStats).

  • getMap(name): Gets a map template by its name.

  • getCosmetics(type): Gets a collection of all cosmetics of a specific type (CosmeticType.CAGE, ARROW, PORTAL).

  • getSelectedCosmetic(player, type): Gets the cosmetic a player has selected for a specific type.

Last updated