Skip to content

Documentation

Andrew edited this page Jun 7, 2021 · 10 revisions

Complete documentation with all methods


Content of the documentation


TAGA.java

.getGameManager()

Return: GameManager

.getTaskManager()

Return: TaskManager

.getVersion() static

Return: String - Api version

GameManager.java

.createGame(World world, String gameName, long timer)

Return: void
Parameters:

World world - The world where the game will be
String gameName - Name of the game
long timer - Game time

.createGame(World world, String gameName)

Return: void
Parameters:

World world - The world where the game will be
String gameName - Name of the game

.getGame(String gameName)

Return: Game
Parameters:

String gameName - Name of the game

.getGames()

Return: HashMap<String, Game>

TaskManager.java

.createGameTask(@NotNull Runnable task, Game game, long delay, long period)

Return: GameTask
Parameters:

@NotNull Runnable task - What you need to do every period
Game game - The game for which the task is being created
long delay - Delay after which the task will be executed
long period - The period with which the task will be executed

.getTask(Game game)

Return: GameTask
Parameters:

Game game - The game in which the task is completed

.getAllTasks()

Return: HashMap<Game, GameTask>

Game.java

.start()

Return: void

.stop(boolean saveWorld)

Return: void
Parameters:

boolean saveWorld - Whether to keep the world after stopping the game

.stop(Player winner, Player loser, boolean saveWorld)

Return: void
Parameters:

Player winner - Whoever won the game
Player loser - The one who lost the game
boolean saveWorld - Whether to keep the world after stopping the game

.stop(Player[] winners, Player[] losers, boolean saveWorld)

Return: void
Parameters:

Player[] winners - Those who won the game
Player[] losers - Those who lost the game
boolean saveWorld - Whether to keep the world after stopping the game

.stop(HashSet<Player> winners, HashSet<Player> losers, boolean saveWorld)

Return: void
Parameters:

HashSet<Player> winners - Those who won the game
HashSet<Player> losers - Those who lost the game
boolean saveWorld - Whether to keep the world after stopping the game

.shutdown(boolean saveWorld)

Return: void
Parameters:

boolean saveWorld - Whether to keep the world after stopping the game

.connectPlayer(Player player)

Return: void
Parameters:

Player player - The player you want to join the game

.connectPlayer(Player player, Location location)

Return: void
Parameters:

Player player - The player you want to join the game
Location location - The location where the player will have to teleport

.connectPlayer(Player player, double x, double y, double z)

Return: void
Parameters:

Player player - The player you want to join the game
double x - X coordinate of the location where the player will have to teleport
double y - Y coordinate of the location where the player will have to teleport
double z - Z coordinate of the location where the player will have to teleport

.disconnectPlayer(GamePlayer player)

Return: void
Parameters:

GamePlayer player - The game player you want to disconnect from the game

.disconnectPlayer(GamePlayer player, Location location)

Return: void
Parameters:

GamePlayer player - The game player you want to join the game
Location location - The location where the player will have to teleport

.disconnectPlayer(GamePlayer player, double x, double y, double z)

Return: void
Parameters:

GamePlayer player - The game player you want to join the game
double x - X coordinate of the location where the player will have to teleport
double y - Y coordinate of the location where the player will have to teleport
double z - Z coordinate of the location where the player will have to teleport

.getWhenStarted()

Return: long

.getPlayers()

Return: HashMap<Player, GamePlayer>

.getTime()

Return: long

.getGameName()

Return: String

.getWorld()

Return: World

.getTask()

Return: GameTask

.isLeaveOnKick()

Return: boolean

.setTime(long time)

Return: void
Parameters:

long time - Time of the whole game

.setKickOnLeave(boolean kickOnLeave)

Return: void
Parameters:

boolean kickOnLeave - Whether to kick the player out of the game when he leaves the server

GamePlayer.java

.getPlayer()

Return: Player

.getGame()

Return: Game

.getScore()

Return: int

.isDied()

Return: boolean

.setScore(int score)

Return: void
Parameters:

int score - Player score

.setDied(boolean isDied)

Return: void
Parameters:

boolean isDied - Has the player died

GameTask.java

.cancel()

Return: void

.getGame()

Return: Game