[API reference](https://jsprismarine.dev/api/index.md) / [@jsprismarine/prismarine](https://jsprismarine.dev/api/@jsprismarine/prismarine/index.md) / player/playerScores

# player/playerScores

## Functions

### scoreDeath()

> **scoreDeath**(`victim`, `killer`): `void`

Defined in: [packages/prismarine/src/player/playerScores.ts:162](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/player/playerScores.ts#L162)

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

[`StoreActor`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/storeActors/classes/StoreActor.md)

Who died.

##### killer

[`StoreActor`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/storeActors/classes/StoreActor.md) \| `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](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/player/playerScores.ts#L111)

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

[`PlayerSession`](https://jsprismarine.dev/api/@jsprismarine/prismarine/player/PlayerSession/classes/PlayerSession.md)

The player.

#### Returns

`void`

#### Java See

ServerPlayer.doTick
