setHealth

fun setHealth(player: Player, amount: Double)

Set the players' health safely by clamping it within 0 and the maximum health.

Parameters

player

The player to set the health of.

amount

The amount to set the health to.