Skip to content

PlayerSurvivalPolicy

What may kill or arrest one player, for players.setSurvivalPolicy. Every field is optional, and each call replaces the whole policy: a field you leave out goes back to its default.

type PlayerSurvivalPolicy = {
isInvulnerable?: boolean;
minimumHealth?: number;
protectedFrom?: readonly DamageCause[];
arrestHandling?: "game" | "gamemode";
};
Field Type Description
isInvulnerable boolean Protected hits take no health and no armour. Default false.
minimumHealth number Protected hits never take health below this, 0-1000. It never raises health. Default 0: no floor.
protectedFrom DamageCause[] Which hits the two fields above cover; not empty. Default: every cause.
arrestHandling "game" | "gamemode" "game" (default): an arrest shows the Busted screen and the player respawns. "gamemode": the player stays where they are and playerArrested lets you decide.