PvpUnknownReason

A type alias: another name for the type it stands for.

Stands for
"localPlayer"

Fields

FieldTypeDescription
LOCAL_PLAYERPvpUnknownReasonThe local player could not be read.
WORLD_TYPEPvpUnknownReasonThe world's type is not known yet.
AREA_STATEPvpUnknownReasonThe wilderness/PvP area state could not be read.
COMBAT_RANGEPvpUnknownReasonThe combat range could not be worked out.
COORDINATESPvpUnknownReasonThe player's position could not be read.

Returned by

MethodReturnsDescription
WorldPvp.state{ kind: "safe" | "active" | "unknown", combatRange: { min: number, max: number }?, reason: PvpUnknownReason? }Whether the local player is somewhere they can be attacked, and how.
WorldPvp.threats{ kind: "safe" | "active" | "unknown", reason: PvpUnknownReason?, combatRange: { min: number, max: number }?, unreadableCandidates: number?, players: { Player }? }Who can attack the local player right now.