ArenaAdapter

open class ArenaAdapter(source)

This class serves as an adapter between the Arena and the underlying data storage mechanism (either JSON or SQL)

Constructors

Link copied to clipboard
open fun ArenaAdapter(guilds: Guilds, adapter: DatabaseAdapter)
Constructs a new ArenaAdapter

Functions

Link copied to clipboard
open fun arenaExists(@NotNull id: @NotNull String): Boolean
Checks if an arena with the given ID exists in the data storage mechanism
Link copied to clipboard
open fun createArena(@NotNull arena: @NotNull Arena)
Creates a new arena in the data storage backend.
Link copied to clipboard
open fun createContainer()
Creates a new container for arenas in the data storage mechanism
Link copied to clipboard
open fun deleteArena(@NotNull id: @NotNull String)
Deletes an arena from the data storage backend.
Link copied to clipboard
Gets a list of all arena IDs in the data storage mechanism
Link copied to clipboard
open fun getAllArenas(): List<Arena>
Gets a list of all arenas in the data storage mechanism
Link copied to clipboard
open fun saveArena(@NotNull arena: @NotNull Arena)
Saves an arena to the data storage backend.
Link copied to clipboard
open fun saveArenas(@NotNull arenas: @NotNull Collection<Arena>)
Saves all the arenas in the collection to the data storage backend.
Link copied to clipboard
open fun updateArena(@NotNull arena: @NotNull Arena)
Updates an existing arena in the data storage backend.