java.lang.Object
tech.guilhermekaua.spigotboot.inventoryapi.internal.engine.phase.ClosePhase

@Internal public final class ClosePhase extends Object
Session teardown: idempotent on closed sessions, cancels the update task, marks the session closed, runs onClose (a throw is logged, teardown always completes), unregisters the session, drops pending deferred operations and closes a container the client still shows after an engine-initiated close. Constructed and invoked only by ViewEngine.
  • Constructor Details

    • ClosePhase

      public ClosePhase(@NotNull @NotNull ViewEngine engine, @NotNull @NotNull SessionRegistry sessions)
      Creates the phase.
      Parameters:
      engine - the owning engine
      sessions - the per-player session registry
  • Method Details

    • close

      public void close(@NotNull @NotNull ViewSession session, @NotNull @NotNull CloseReason reason)
      Closes a session with the given reason; closing an already closed session is a no-op.
      Parameters:
      session - the session to close
      reason - the close reason exposed to onClose