preventDeath

public boolean preventDeath(Player player, double incomingDamage)

Attempts to prevent fatal damage. Called from damage event handler before damage is applied.

Return

true if death was prevented, false otherwise

Parameters

player

The player about to take damage

incomingDamage

The damage that would be dealt