Skip to content

GameEndEvent

GameEndEvent fires after a win or loss condition changes the arena to ENDING and the built-in result message is finalized.

  • Package: dev.despical.snake.api.event.game
  • Parent Class: SnakeEvent
  • Cancellable: No
MethodReturn TypeDescription
getArena()ArenaArena whose round has ended.
getUser()UserPlayer still assigned during the ending delay.

The player has not yet been returned to the end location. The delay is controlled by the arena’s endTimer option.

@EventHandler
public void onSnakeEnd(GameEndEvent event) {
int score = event.getArena().getScore();
getLogger().info(event.getUser().getName() + " finished with " + score);
}