LorekeeperInterviewManager

Manages Lorekeeper NPC interviews with players.

Handles the interview flow including offering interviews, accepting/declining, asking questions, and recording answers to LoreStorage.

Interview Flow

  1. offerInterview presents Accept/Decline buttons to the player

  2. accept starts the interview session

  3. handleChatAnswer processes player responses

  4. Answers are recorded to LoreStorage as chunked entries

Question Pools

See also

for tracking interview state

for where answers are stored

Types

Link copied to clipboard
data class ActiveInterviewSnapshot(val playerId: UUID, val playerName: String, val currentQuestion: String? = null, val currentTopic: String? = null, val awaitingQuestionPreparation: Boolean = false, val awaitingReaction: Boolean = false)

Snapshot of an in-progress interview session for external observers.

Link copied to clipboard
data class InterviewStartContext(val triggerHint: String? = null, val triggerLabel: String? = null)

Optional context describing what triggered an interview offer.

Link copied to clipboard

Available question pools for interviews.

Functions

Link copied to clipboard
fun accept(player: ServerPlayer): Boolean

Accepts a pending interview offer and starts the session. Returns false if none pending.

Link copied to clipboard
fun decline(player: ServerPlayer)

Declines a pending interview offer.

Link copied to clipboard

Returns current in-progress interview snapshots for all players.

Link copied to clipboard
fun handleChatAnswer(player: ServerPlayer, message: String): Boolean

Processes a chat message as an interview answer. Returns true if it was consumed.

Link copied to clipboard

Returns true when a player currently has an active interview session.

Link copied to clipboard

Returns true when a player currently has a pending interview offer.

Link copied to clipboard
fun moveToNextTopic(player: ServerPlayer): Boolean

Moves to the next interview topic (or next investigation prompt when active).

Link copied to clipboard
fun offerInterview(player: ServerPlayer)

Offers a main-pool interview to the player with a default prompt.

fun offerInterview(player: ServerPlayer, prompt: Component)

Offers a main-pool interview to the player with a custom prompt.

fun offerInterview(player: ServerPlayer, prompt: Component, pool: LorekeeperInterviewManager.QuestionPool, entityId: UUID? = null, startContext: LorekeeperInterviewManager.InterviewStartContext? = null)

Offers an interview from the specified question pool with a custom prompt.

Link copied to clipboard
fun queueInvestigationMentions(player: ServerPlayer, contextQuestion: String, text: String)

Routes free-form text through mention detection and investigation lead queueing.

Link copied to clipboard
fun skipCurrentQuestion(player: ServerPlayer): Boolean

Compatibility alias for legacy skip command paths.

Link copied to clipboard
fun skipRemainingInterview(player: ServerPlayer): Boolean

Ends the current interview immediately without waiting for unanswered topics.

Link copied to clipboard
fun startInterview(player: ServerPlayer, pool: LorekeeperInterviewManager.QuestionPool = QuestionPool.MAIN, startContext: LorekeeperInterviewManager.InterviewStartContext? = null)

Starts an interview session with the player using the specified question pool.