💬API
Here is a possible TNT-Tag API page:
CaptureTheFlag API
To use the CaptureTheFlag API, call CaptureTheFlag.getAPI(), which returns an instance of the API class. The API class provides the following methods:
Methods
int getWins(UUID playerUUID)
int getWins(UUID playerUUID)Returns the number of times the specified player has won a game.
void setWins(UUID playerUUID, int value)
void setWins(UUID playerUUID, int value)Sets the number of times the specified player has won a game.
boolean arenaExists(String arenaName)
boolean arenaExists(String arenaName)Returns true if the specified arena exists.
HashMap<Player, PlayerType> getPlayers(String arenaName)
HashMap<Player, PlayerType> getPlayers(String arenaName)Returns a map of the players in the specified arena and their types (TNT or player).
String getArenaState(String arenaName)
String getArenaState(String arenaName)Returns the current state of the specified arena (WAITING, STARTING, RUNNING, or ENDING).
TreeMap<UUID, Integer> getWinsData()
TreeMap<UUID, Integer> getWinsData()Returns a map of the UUIDs of all players and their corresponding number of wins.
TreeMap<UUID, Integer> getWinstreakData()
Returns a map of the UUIDs of all players and their corresponding winstreak.
Events
The following events are available:
ArenaEndingEvent
ArenaEndingEventMethods
String getArenaName(): Returns the name of the arena that is ending.HashMap<Player, PlayerType> getPlayers(): Returns a map of the players in the arena and their types.ArrayList<Player> getWinners(): Returns a list of the players who won the game.
ArenaStartedEvent
ArenaStartedEventMethods
String getArenaName(): Returns the name of the arena that has started.
ArenaStartingEvent
ArenaStartingEventMethods
String getArenaName(): Returns the name of the arena that is starting.
PlayerJoinArenaEvent
PlayerJoinArenaEventMethods
Player getPlayer(): Returns the player who joined the arena.String getArenaName(): Returns the name of the arena the player joined.
PlayerLeaveArenaEvent
PlayerLeaveArenaEventMethods
Player getPlayer(): Returns the player who left the arena.String getArenaName(): Returns the name of the arena the player left.
PlayerLostRoundEvent
PlayerLostRoundEventMethods
Player getPlayer(): Returns the player who lost the round.String getArenaName(): Returns the name of the arena where the player lost.
Last updated