GameStartEvent
GameStartEvent fires after an accepted game has entered IN_GAME and prepared the playable board, first snake segment, initial movement direction, and apple.
Technical Overview
Section titled “Technical Overview”- Package:
dev.despical.snake.api.event.game - Parent Class:
SnakeEvent - Cancellable: No
| Method | Return Type | Description |
|---|---|---|
getGame() | Game | Active game instance. |
getArena() | Arena | Arena beginning the round. |
getUser() | User | Assigned player wrapper. |
At this moment the player is already teleported and mounted. The event is informational and cannot cancel the start.
@EventHandlerpublic void onSnakeStart(GameStartEvent event) { event.getUser().getPlayer().sendMessage( "Starting Snake arena " + event.getArena().getId() );}