Games

class Games

The minigames of the server that bots play: an integration for each supported plugin that is enabled (SkyWarsReloaded, BedWars2023, Phoenix Duels), the bots that fill their arenas and the duels against bots. All calls on the server thread.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The ids of the games bots play here: skywars, bedwars, duels, as far as their plugins are enabled.

Functions

Link copied to clipboard
fun addListener(listener: GameListener)
Link copied to clipboard
fun arenas(game: String): List<Arena>

The arenas of game; for duels the maps.

Link copied to clipboard
fun bots(arena: Arena): List<Bot>

The bots playing in arena.

Link copied to clipboard
fun duel(player: Player, kit: String, skillLevel: String? = null): String?

Starts a duel of player against a new bot with kit, a Phoenix Duels kit and mode, on one of its maps, at skillLevel (beginner, easy, normal, hard). Null when it starts, else why not.

Link copied to clipboard

The kits bots duel with.

Link copied to clipboard
fun fill(arena: Arena): Boolean

Fills arena with bots up to one place short of full, real players or not, and lets them play its round to the end. False when no game has the arena or its round already runs.

Link copied to clipboard
fun join(player: Player, arena: Arena): Boolean

Joins a real player to arena; in a full arena that has not started, a bot makes room.

Link copied to clipboard
fun play(bot: Bot, arena: Arena): Boolean

Joins bot to arena and plays the arena's game with it, as a filled-in bot: it leaves when it is out, when the round ends or when no real player is left in it. False when the plugin refused it.

Link copied to clipboard
Link copied to clipboard
fun state(arena: Arena): RoundState?

Where the round of arena is; null for an arena no game has.