Interface GameModule<P,L,W,M,I,S,B,E,Ls,Pr>


public interface GameModule<P,L,W,M,I,S,B,E,Ls,Pr>
Main interface implemented by all game modules. Module metadata is loaded from module.yml automatically.
  • Method Details

    • onLoad

      void onLoad()
      Called when module is loaded (once, on server start). Use this to: - Register game in vote menu - Initialize static resources Configuration is OPTIONAL - access via getModuleConfig() if needed.
    • onStart

      void onStart(GameContext<P,L,W,M,I,S,B,E> context)
      Called when a game starts in an arena. Use this to initialize game-specific logic.
      Parameters:
      context - Game context with all APIs
    • onEnd

      void onEnd(GameContext<P,L,W,M,I,S,B,E> context, GameResult<P> result)
      Called when a game ends.
      Parameters:
      context - Game context
      result - Game result with winner and players
    • onDisable

      void onDisable()
      Called when module is unloaded (server shutdown/reload).
    • registerEvents

      void registerEvents(CustomEventRegistry<Ls,Pr> registry)
    • onGameStart

      default void onGameStart(GameContext<P,L,W,M,I,S,B,E> context)
      Called after countdown finishes and game starts.
    • onGameTick

      default void onGameTick(GameContext<P,L,W,M,I,S,B,E> context, int secondsRemaining)
    • onPlayerEliminate

      default void onPlayerEliminate(GameContext<P,L,W,M,I,S,B,E> context, P player, String reason)
    • onPlayerRespawn

      default void onPlayerRespawn(GameContext<P,L,W,M,I,S,B,E> context, P player)
    • getCustomPlaceholders

      default Map<String,String> getCustomPlaceholders(P player)
    • onCountdownTick

      default void onCountdownTick(GameContext<P,L,W,M,I,S,B,E> context, int secondsLeft)
      Called every tick during countdown phase. Use this to send countdown titles/sounds.
      Parameters:
      context - Game context
      secondsLeft - Seconds remaining in countdown
    • onCountdownFinish

      default void onCountdownFinish(GameContext<P,L,W,M,I,S,B,E> context)
      Called when countdown finishes, just before game starts. Use this to send "GO!" title or final preparation.
      Parameters:
      context - Game context
    • freezePlayersOnCountdown

      default boolean freezePlayersOnCountdown()
      Should players be frozen during countdown? If true, players cannot move during countdown phase.
      Returns:
      true to freeze players, false to allow movement
    • getDisabledRequirements

      default Set<SetupRequirement> getDisabledRequirements()
      Returns the set of default setup requirements that this module explicitly disables. Requirements not present in the returned set remain enforced as usual (backward-compatible default).

      When a requirement is disabled:

      • Setup flows will skip prompts for that requirement.
      • Minigame enable/boot validation will skip checks for that requirement.
      Override this method to opt out of one or more default requirements.

      Returns:
      an unmodifiable set of disabled requirements, empty by default
      Since:
      3.2
    • allowJoinInProgress

      default boolean allowJoinInProgress()
      Declares whether players may join an in-progress match in standalone mode.

      Defaults to false (joining after start is not allowed). Even if this returns true, the core will never allow join-in-progress in party mode.

      Returns:
      true to allow join-in-progress in standalone mode
      Since:
      3.2