Entity paper/is_player

Is Player

Checks whether an entity is a player and extracts the Player reference if so.

Note: Use this after receiving an entity output that might be a player (e.g. the killer output of Entity Death Trigger or Player Death Trigger). Connect isPlayer to a Branch node before using the player output to avoid null errors.

Inputs

NameTypeOptionalDescription
entity entity The entity to check.

Outputs

NameTypeDescription
isPlayer boolean True if the entity is a player.
player player The entity cast to a Player (null if not a player).

Examples

Reward player killers only

Give a reward only when the killer of an entity is a player, not another mob.

  1. Entity Death Trigger → killer → Is Player (entity)
  2. Is Player → isPlayer → Branch
  3. Branch (true) → Player Give Item (use Is Player → player as the player input)