API reference / @jsprismarine/prismarine / player/playerScores
player/playerScores
Functions
scoreDeath()
scoreDeath(
victim,killer):void
Defined in: packages/prismarine/src/player/playerScores.ts:162
The scores a death raises: the victim's deaths and their time since death and rest, and for a player who killed, their kills.
Parameters
victim
Who died.
killer
StoreActor | null
Who is answerable for it, if anybody.
Returns
void
Java See
ServerPlayer.die
Java See
ServerPlayer.awardKillScore
tickPlayerScores()
tickPlayerScores(
session):void
Defined in: packages/prismarine/src/player/playerScores.ts:111
One tick of the player's scores: the statistics Java's player tick awards, and each vitals objective set to the player's reading.
Java sets a vitals score when the reading differs from the one it last recorded, which it records whether or not anything counts it, so an objective added later waits for the next change. Here each objective is compared with its own score, so a new health objective shows the player's health on the next tick, and an unchanged one sends nothing.
Parameters
session
The player.
Returns
void
Java See
ServerPlayer.doTick