VitalGlobalMinigameState

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.

Listener-events will be scoped to the currently active state. Meaning the event-handlers defined within a single state will only trigger, when that state is active. The current minigame state can be managed by VitalGlobalMinigameService.

@GlobalMinigameState
public class MyGlobalMinigameState implements VitalGlobalMinigameState {
@Override
public void onEnable() {
// ...
}

@Override
public void onDisable() {
// ...
}
}

Inheritors

Properties

Link copied to clipboard
open val logger: Logger

Functions

Link copied to clipboard
open fun onDisable()

Lifecycle function; called when this state is disabled by switching to a new state using VitalGlobalMinigameService.setState.

Link copied to clipboard
open fun onEnable()

Lifecycle function; called when this state is enabled via VitalGlobalMinigameService.setState.