Documentation
living
typePaper
An entity with health.
Also has everything from sender, entity.
Properties 5
living.health: number
settablePaper
Current health (20 is ten hearts).
living.max_health: number
read-onlyPaper
Maximum health.
living.is_dead: bool
read-onlyPaper
True if dead.
living.ai: bool
settablePaper
Whether the mob moves and attacks on its own.
living.target: entity
settablePaper
What a mob is attacking, or none.
Methods 6
Deals damage.
Heals fully, or by an amount.
living.kill()
Paper
Kills the entity.
Gives a potion effect, e.g. mob.effect("slowness", 10 seconds, 2).
True if the entity has that potion effect.
Removes one potion effect, or all of them.
Also has everything from sender
Also has everything from entity
uuid: textUnique id.type: textEntity type, such as zombie.name: textName of the entity.location: locationWhere the entity is.world: worldThe world the entity is in.is_valid: boolFalse once the entity is removed or dead.is_player: boolTrue if the entity is a player.custom_name: textName tag shown above the entity.glowing: boolWhether the entity has a glowing outline.gravity: boolWhether gravity pulls the entity down.silent: boolWhether the entity makes no sounds.invulnerable: boolWhether the entity cannot be hurt.fire_ticks: numberTicks the entity keeps burning (0 is not on fire).on_ground: boolTrue if the entity is standing on a block.passengers: listEntities riding this one.vehicle: entityWhat the entity is riding, or none.teleport(location)Teleports the entity (to a location, entity or block).remove()Removes the entity from the world.push(x, y, z)Sets the entity's velocity, e.g. player.push(0, 1, 0) launches upwards.nearby(radius)Other entities within a radius.ride(vehicle)Makes this entity ride another one.eject()Throws off every passenger.tag(key)Custom data saved on the entity with set_tag, or none.set_tag(key, value)Saves custom data on the entity (text, number, list, map). none removes it. Survives restarts.run(function, ...args)Runs a function on the thread that owns this entity. Needed on Folia when acting on a player from 'every' or from another player's event.