LorekeeperReputationService

Tracks per-player reputation for Lorekeeper interactions.

Reputation is stored in LorekeeperPlayerData and used to gate rewards and perks.

Types

Link copied to clipboard
data class ReputationChangeContext(val source: LorekeeperReputationService.ReputationMemorySource, val reason: String, val evidence: String = "", val relatedNames: List<String> = emptyList(), val playerName: String = "")

Context payload attached to a reputation change or non-scoring memory signal.

Link copied to clipboard

Structured source categories for reputation memory events.

Link copied to clipboard

Reputation tiers used to describe a player's standing with the Lorekeeper.

Link copied to clipboard
data class ReputationUpdateResult(val oldScore: Int, val newScore: Int, val oldTier: LorekeeperReputationService.ReputationTier, val newTier: LorekeeperReputationService.ReputationTier, val crossedIntoHero: Boolean, val crossedIntoVillain: Boolean)

Result of applying a reputation update.

Functions

Link copied to clipboard
fun addRep(server: MinecraftServer, playerId: UUID, delta: Int): Int

Adds to the player's reputation score and clamps to valid range.

Adds to the player's reputation score with structured context and crossing detection.

Link copied to clipboard
fun getRepScore(server: MinecraftServer, playerId: UUID): Int

Returns the player's current reputation score.

Link copied to clipboard

Returns the tier that corresponds to the given reputation score.

fun getTier(server: MinecraftServer, playerId: UUID): LorekeeperReputationService.ReputationTier

Returns the tier for a player.

Link copied to clipboard
fun recordSignal(server: MinecraftServer, playerId: UUID, context: LorekeeperReputationService.ReputationChangeContext)

Records non-scoring reputation memory context without changing score/tier.