Package-level declarations

Types

Link copied to clipboard
@Component
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class GlobalMinigameState

Convenience-annotation to mark a specific class as a minigame state. Should be used in combination with VitalGlobalMinigameState managed VitalGlobalMinigameState. Internally delegates functionality to Component.

Link copied to clipboard

Defines a countdown minigame state within the Vital-Framework. A countdown minigame state can be any state within a running or preparing minigame, which contains a countdown. Every countdown state will by default be a VitalGlobalMinigameState, SpigotListener and VitalCountdownTask.

Link copied to clipboard

The global minigame manager to use when creating a global minigame for the entire game server. A minigame consists of multiple states, which all are listeners by default. Only the state that is currently active in this service will receive game-events. Switching to another state means that the previous state will not be an active listener anymore.

Link copied to clipboard
interface VitalGlobalMinigameState : Listener

Defines a minigame state within the Vital-Framework. A minigame state can be any state within a running or preparing minigame. Every state will by default be a SpigotListener.

Link copied to clipboard
open class VitalMinigameInstance(var id: UUID = UUID.randomUUID(), val plugin: SpigotPlugin, val world: World) : VitalEntity<UUID> , Listener

Defines a single game instance that can be hosted on the server. Each instance can have n-amount of states, but only one active state at a given time. Every state may have n-amount of event handlers, which will only fire when their state is currently active on an instance. Every instance will be bound to its own world for proper instance capsulation.

Link copied to clipboard

Defines a single game instance state within an active minigame instance, that is capable of running as a countdown task. All event handlers registered here will only be active, when this state is active in its registered game instance. A state may perform mutation on its own instance that's passed to its constructor to modify game data.

Link copied to clipboard
abstract class VitalMinigameInstanceException(message: String, cause: Throwable? = null) : RuntimeException

Internal exception; thrown during VitalMinigameInstance lifecycles.

Link copied to clipboard

The global repository for in-memory data management for VitalMinigameInstance instances.

Link copied to clipboard
open class VitalMinigameInstanceService(vitalMinigameInstanceRepository: VitalMinigameInstanceRepository, plugin: SpigotPlugin)

The global minigame instance manager to use when creating multiple minigames on the same game server. Each minigame will run in its own capsulated instance, which can have n-amount of states. A state may also have n-amount of event handlers mapped to it. Each event handler will only be active when the state is also active.

Link copied to clipboard

Defines a single state within an active minigame instance. All event handlers registered here will only be active, when this state is active in its registered game instance. A state may perform mutation on its own instance that's passed to its constructor to modify game data.

Link copied to clipboard
class VitalMinigamesModule(vitalMinigameInstanceRepository: VitalMinigameInstanceRepository, vitalMinigameInstanceService: VitalMinigameInstanceService) : VitalModule