VitalGlobalMinigameService

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.

Constructors

Link copied to clipboard
constructor(plugin: SpigotPlugin, states: List<VitalGlobalMinigameState>)

Properties

Link copied to clipboard
Link copied to clipboard

Holds the currently active state. All event handlers defined on this state are active while this state is active. Once switched to another state, all event handlers of the old state will be unregistered, while all event handlers of the new state are registered.

Link copied to clipboard

Functions

Link copied to clipboard

Checks if the given state is active by its class.

Link copied to clipboard

Sets the state of the game to the state with the given class. If a state with the given class cannot be found, an exception is thrown.

Sets the state of the game to the given state.