Skip to content

GameStopEvent

The GameStopEvent is fired after KOTL completes game cleanup.


  • Package: dev.despical.kotl.api.events.game
  • Parent Class: GameEvent
  • Cancellable: No

Before this event fires:

  • Players receive the configured stop message when one exists.
  • Players are teleported to the arena end location where possible.
  • Inventory and player state restoration is scheduled or completed.
  • Players are removed from the game set.
  • Scoreboards and boss bars are removed.

The event keeps an immutable UUID snapshot of players captured before cleanup.


ReasonDescription
ARENA_DELETEDThe arena was permanently deleted.
ARENA_DISABLEDThe arena availability toggle was disabled.
SERVER_RELOADKOTL or the server is reloading.
SERVER_SHUTDOWNThe server is shutting down.
STOP_COMMANDAn administrator used /kotl stop.

MethodReturn TypeDescription
getGame()GameGame that was stopped.
getArena()ArenaArena associated with the game.
getReason()StopReasonCleanup reason.
getStoppedPlayers()List<UUID>Immutable pre-cleanup player snapshot.

import dev.despical.kotl.api.events.game.GameStopEvent;
import dev.despical.kotl.game.StopReason;
import org.bukkit.event.EventHandler;
@EventHandler
public void onGameStop(GameStopEvent event) {
StopReason reason = event.getReason();
if (reason == StopReason.ARENA_DISABLED) {
System.out.println("Maintenance started for " + event.getArena().getId());
}
}