GameEvent
GameEvent is the abstract base for events associated with one live Whack Me game session.
Technical Overview
Section titled “Technical Overview”- Package:
dev.despical.whackme.api.event.game - Parent:
WhackMeEvent
Methods
Section titled “Methods”| Method | Return type | Description |
|---|---|---|
getGame() | Game | Live game associated with the event. |
getArena() | Arena | Arena that owns the game. |
Through Game, listeners can read the player/user, timer, state, point handler, scoreboard manager, boss bar manager, and arena.
Concrete Events
Section titled “Concrete Events”GameStartEventGameEndEventGameStopEventGameStateChangeEvent
@EventHandlerpublic void onStart(GameStartEvent event) { String arenaId = event.getArena().getId(); int duration = event.getGame().getTimer(); getLogger().info("Whack Me started in " + arenaId + " for " + duration + " seconds.");}