Skip to main content

Living entities

Apply Effect​

living_entity.apply_effect

Gives an entity a potion effect for some seconds; visible effects show particles and an icon

InTypeWhat it is
Living EntityLiving EntityWho gets the effect
EffectPotion Effect TypeThe kind of effect
SecondsNumberHow long it lasts
AmplifierIntegerIts strength, 0 for level I
Visible (optional)BooleanWhether it shows particles and an icon; true when not given

Goes on with: Next

Attribute Of Entity​

living_entity.attribute

Gets the specified attribute instance from the object.

InTypeWhat it is
Living EntityLiving EntityRepresents a living entity, such as a monster or player
AttributeAttributethe attribute to get
OutTypeWhat it is
ResultAttributeInstancethe attribute instance or null if not applicable to this object

Damage​

living_entity.damage

Deals damage to an entity; with a source, the damage counts as dealt by it

InTypeWhat it is
Living EntityLiving EntityWho takes the damage
AmountNumberThe damage, in half hearts
Source (optional)EntityWho deals it; without, the damage has no source

Goes on with: Next

Has Line Of Sight​

living_entity.has_line_of_sight

Whether a living entity can see another one, with no block in between

InTypeWhat it is
Living EntityLiving EntityWho looks
OtherEntityWhat it looks at
OutTypeWhat it is
ResultBooleanWhether it sees it; on Folia false when the other is in another region

Launch Projectile​

living_entity.launch_projectile

Launches a projectile from the shooter straight at a target

InTypeWhat it is
ShooterLiving EntityWho launches it
TargetEntityWhat it flies at
SpeedNumberHow fast it flies
OutTypeWhat it is
ProjectileProjectileThe launched projectile; on Folia missing when the target is in another region and nothing was launched

Goes on with: Next

Mutate Living Entity​

living_entity.mutate

Changes the properties of a Living Entity that are given, the others stay as they are, and gives every property's value after the change

InTypeWhat it is
Living EntityLiving EntityRepresents a living entity, such as a monster or player
Absorption Amount (optional)NumberSets the entity's absorption amount.
Active Item Remaining Time (optional)IntegerSets the number of ticks that remain for getActiveItem()'s usage.
Ai (optional)BooleanSets whether an entity will have AI.
Arrow Cooldown (optional)IntegerSets the time in ticks until the next arrow leaves the entity's body.
Arrows In Body (optional)IntegerSet the amount of arrows in the entity's body.
Bee Stinger Cooldown (optional)IntegerSets the time in ticks until the next stinger leaves the entity's body.
Bee Stingers In Body (optional)IntegerSet the amount of bee stingers in the entity's body.
Body Yaw (optional)FloatSets entity body yaw
Can Pickup Items (optional)BooleanSets whether or not the living entity can pick up items.
Collidable (optional)BooleanSet if this entity will be subject to collisions with other entities.
Friction State (optional)TriStateSets the friction state of this entity.
Gliding (optional)BooleanMakes entity start or stop gliding.
Health (optional)NumberSets the entity's health from 0 to getMaxHealth(), where 0 is dead.
Jumping (optional)BooleanSet entity jump state Setting to true will mark the entity to jump.
Killer (optional)PlayerSets the player identified as the killer of the living entity.
Last Damage (optional)NumberSets the damage dealt within the current no damage ticks time period.
Leash Holder (optional)EntitySets the leash on this entity to be held by the supplied entity.
Maximum Air (optional)IntegerSets the maximum amount of air the living entity can have, in ticks.
Maximum No Damage Ticks (optional)IntegerSets the living entity's current maximum no damage ticks.
No Action Ticks (optional)IntegerSet the ticks that this entity has performed no action.
No Damage Ticks (optional)IntegerSets the living entity's current no damage ticks.
Remaining Air (optional)IntegerSets the amount of air that the living entity has remaining, in ticks.
Remove When Far Away (optional)BooleanSets whether or not the living entity despawns when away from players or not.
Riptiding (optional)BooleanMakes entity start or stop riptiding.
Waypoint Color (optional)ColorSets the color of the waypoint icon.
Custom Name Visible (optional)BooleanSets whether or not to display the mob's custom name client side.
Fall Distance (optional)FloatSets the fall distance for this entity
Fire Ticks (optional)IntegerSets the entity's current fire ticks (ticks before the entity stops being on fire).
Freeze Ticks (optional)IntegerSets the entity's current freeze ticks (amount of ticks the entity has been in powdered snow).
Glowing (optional)BooleanSets whether the entity has a team colored (default: white) glow.
Gravity (optional)BooleanSets whether gravity applies to this entity.
Invisible (optional)BooleanSets whether the entity is invisible or not.
Invulnerable (optional)BooleanSets whether the entity is invulnerable or not.
No Physics (optional)BooleanSets this entity no physics status.
Op (optional)BooleanSets the operator status of this object
Persistent (optional)BooleanSets whether or not the entity gets persisted.
Portal Cooldown (optional)IntegerSets the period of time (in ticks) before this entity can use a portal.
Pose (optional)PoseSets the entity's current Pose.
Silent (optional)BooleanSets whether the entity is silent or not.
Sneaking (optional)BooleanSets the sneak mode the entity.
Ticks Lived (optional)IntegerSets the amount of ticks this entity has lived for.
Velocity (optional)VectorSets this entity's velocity in meters per tick
Visible By Default (optional)BooleanSets whether or not this entity is visible by default.
Visual Fire (optional)TriStateSets if the entity has visual fire (it will always appear to be on fire).
OutTypeWhat it is
Absorption AmountNumberGets the entity's absorption amount.
Active ItemItemGets the item being actively "used" or consumed.
Active Item HandEquipmentSlotGet the hand using the active item.
Active Item Remaining TimeIntegerGets the remaining number of ticks for getActiveItem()'s usage.
Active Item Used TimeIntegerGet how long the getActiveItem() has been in use for.
Active Potion EffectsCollection<Potion Effect>Returns all currently active PotionEffects on the living entity.
Arrow CooldownIntegerGets the time in ticks until the next arrow leaves the entity's body.
Arrows In BodyIntegerGets the amount of arrows in an entity's body.
Bee Stinger CooldownIntegerGets the time in ticks until the next bee stinger leaves the entity's body.
Bee Stingers In BodyIntegerGets the amount of bee stingers in an entity's body.
Body YawFloatGets entity body yaw
Can Pickup ItemsBooleanGets if the living entity can pick up items.
ClimbingBooleanGets if the entity is climbing.
CollidableBooleanGets if this entity is subject to collisions with other entities.
Collidable ExemptionsSet<UUID>Gets a mutable set of UUIDs of the entities which are exempt from the entity's collidable rule and which's collision with this entity will behave the opposite of it.
Death SoundSoundGet the Sound this entity will make on death.
EquipmentEntityEquipmentGets the inventory with the equipment worn by the living entity.
Eye HeightNumberGets the height of the living entity's eyes above its Location.
Eye LocationLocationGet a Location detailing the current eye position of the living entity.
Fall Damage Sound BigSoundGet the Sound this entity will make when falling from a large height.
Fall Damage Sound SmallSoundGet the Sound this entity will make when falling from a small height.
Forwards MovementFloatRetrieves the forwards movement direction of the entity.
Friction StateTriStateGets the friction state of this entity.
GlidingBooleanChecks to see if an entity is gliding, such as using an Elytra.
Hand RaisedEquipmentSlotGets the hand raised by this living entity.
Hand Raised TimeIntegerGet how long the entity's hands have been raised (Charging Bow attack, using a potion, etc)
HealthNumberGets the entity's health from 0 to getMaxHealth(), where 0 is dead.
Hurt DirectionFloatGets player hurt direction
Hurt SoundSoundGet the Sound this entity will make when damaged.
Item Use Remaining TimeIntegerGets remaining time a player needs to keep hands raised with an item to finish using it.
JumpingBooleanGet entity jump state.
KillerPlayerGets the player identified as the killer of the living entity.
Last DamageNumberReturns the living entity's last damage taken in the current no damage ticks time.
Leash HolderEntityGets the entity that is currently leading this entity.
LeashedBooleanReturns whether the entity is currently leashed.
Maximum AirIntegerReturns the maximum amount of air the living entity can have, in ticks.
Maximum No Damage TicksIntegerReturns the living entity's current maximum no damage ticks.
No Action TicksIntegerGet the ticks that this entity has performed no action.
No Damage TicksIntegerReturns the living entity's current no damage ticks.
Remaining AirIntegerReturns the amount of air that the living entity has remaining, in ticks.
Remove When Far AwayBooleanReturns if the living entity despawns when away from players or not.
RiptidingBooleanChecks to see if an entity is currently riptiding.
Sideways MovementFloatRetrieves the sideways movement direction of the entity.
SleepingBooleanReturns whether this entity is slumbering.
Sound PitchFloatGet the sound pitch at which this entity plays its sounds with.
Sound VolumeFloatGet the sound volume at which this entity plays its sounds with.
SwimmingBooleanChecks to see if an entity is swimming.
Upwards MovementFloatRetrieves the upwards movement direction of the entity.
Waypoint ColorColorGets the current color of the waypoint icon, if any.
As StringTextGet this entity as an NBT string.
Custom Name VisibleBooleanGets whether or not the mob's custom name is displayed client side.
DeadBooleanReturns true if this entity has been marked for removal.
EmptyBooleanCheck if a vehicle has passengers.
Entity IdIntegerReturns the network protocol ID for this entity.
Entity Spawn ReasonSpawnReason{@return the org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason that initially spawned this entity or null if not yet spawned}
FacingBlockFaceGet the closest cardinal BlockFace direction an entity is currently facing.
Fall DistanceFloatReturns the distance this entity has fallen
Fire TicksIntegerReturns the entity's current fire ticks (ticks before the entity stops being on fire).
Freeze Ticking LockedBooleanGets if the entity currently has its freeze ticks locked to a set amount.
Freeze TicksIntegerReturns the entity's current freeze ticks (amount of ticks the entity has been in powdered snow).
FrozenBooleanGets if the entity is fully frozen (it has been in powdered snow for max freeze ticks).
GlowingBooleanGets whether the entity is glowing or not.
HeightNumberGets the entity's height
In LavaBooleanCheck if entity is in lava
In Powdered SnowBooleanCheck if entity is inside powdered snow.
In RainBooleanCheck if entity is in rain
In WaterBooleanReturns true if the entity is in water.
In WorldBooleanChecks if this entity has been spawned in a world.
Inside VehicleBooleanReturns whether this entity is inside a vehicle.
InvisibleBooleanGets whether the entity is invisible or not.
InvulnerableBooleanGets whether the entity is invulnerable or not.
LocationLocationGets the entity's current position
Max Fire TicksIntegerReturns the entity's maximum fire ticks.
Max Freeze TicksIntegerReturns the entity's maximum freeze ticks (amount of ticks before it will be fully frozen)
NameTextGets the name of this command sender
On GroundBooleanReturns true if the entity is supported by a block.
OpBooleanChecks if this object is a server operator
OriginLocationGets the location where this entity originates from.
PassengersList<Entity>Gets a list of passengers of this vehicle.
PersistentBooleanReturns true if the entity gets persisted.
Pick Item StackItemGets the ItemStack that a player would select / create (in creative mode) when using the pick block action on this entity.
Piston Move ReactionPistonMoveReactionReturns the reaction of the entity when moved by a piston.
PitchFloatGets this entity's pitch
Portal CooldownIntegerGets the period of time (in ticks) before this entity can use a portal.
PosePoseGets the entity's current pose.
Removal ReasonRemovalReason{@return the reason this entity was removed}
Remove Event CauseCauseGets the cause used for this entity's remove event.
Scoreboard Entry NameTextGets the string name of the entity used to track it in Scoreboards.
Scoreboard TagsSet<Text>Returns a set of tags for this entity.
SilentBooleanGets whether the entity is silent or not.
SneakingBooleanReturns if the entity is in sneak mode
Sound CategorySoundCategoryGet the SoundCategory this entity will use when playing its sounds.
Spawn CategorySpawnCategoryGet the category of spawn to which this entity belongs.
Swim High Speed Splash SoundSoundGet the Sound this entity makes when splashing in water at high speeds.
Swim SoundSoundGet the Sound this entity makes while swimming.
Swim Splash SoundSoundGet the Sound this entity makes when splashing in water.
TickingBooleanCheck if entity is inside a ticking chunk
Ticks LivedIntegerGets the amount of ticks this entity has lived for.
Tracked BySet<Player>Get all players that are currently tracking this entity.
TypeEntity TypeGet the type of the entity.
Under WaterBooleanCheck if entity is underwater
Unique IdUUIDReturns a unique and persistent id for this entity
ValidBooleanReturns false if the entity has died, been despawned for some other reason, or has not been added to the world.
VehicleEntityGet the vehicle that this entity is inside.
VelocityVectorGets this entity's current velocity
Visible By DefaultBooleanGets whether or not this entity is visible by default.
Visual FireTriStateRetrieves the visual fire state of the entity.
WidthNumberGets the entity's width
WorldWorldGets the current world this entity resides in
XNumberGets the x-coordinate of this entity
YNumberGets the y-coordinate of this entity
YawFloatGets this entity's yaw
ZNumberGets the z-coordinate of this entity

Goes on with: Next

Read Living Entity​

living_entity.read

Reads the properties of a Living Entity

InTypeWhat it is
Living EntityLiving EntityRepresents a living entity, such as a monster or player
OutTypeWhat it is
Absorption AmountNumberGets the entity's absorption amount.
Active ItemItemGets the item being actively "used" or consumed.
Active Item HandEquipmentSlotGet the hand using the active item.
Active Item Remaining TimeIntegerGets the remaining number of ticks for getActiveItem()'s usage.
Active Item Used TimeIntegerGet how long the getActiveItem() has been in use for.
Active Potion EffectsCollection<Potion Effect>Returns all currently active PotionEffects on the living entity.
Arrow CooldownIntegerGets the time in ticks until the next arrow leaves the entity's body.
Arrows In BodyIntegerGets the amount of arrows in an entity's body.
Bee Stinger CooldownIntegerGets the time in ticks until the next bee stinger leaves the entity's body.
Bee Stingers In BodyIntegerGets the amount of bee stingers in an entity's body.
Body YawFloatGets entity body yaw
Can Pickup ItemsBooleanGets if the living entity can pick up items.
ClimbingBooleanGets if the entity is climbing.
CollidableBooleanGets if this entity is subject to collisions with other entities.
Collidable ExemptionsSet<UUID>Gets a mutable set of UUIDs of the entities which are exempt from the entity's collidable rule and which's collision with this entity will behave the opposite of it.
Death SoundSoundGet the Sound this entity will make on death.
EquipmentEntityEquipmentGets the inventory with the equipment worn by the living entity.
Eye HeightNumberGets the height of the living entity's eyes above its Location.
Eye LocationLocationGet a Location detailing the current eye position of the living entity.
Fall Damage Sound BigSoundGet the Sound this entity will make when falling from a large height.
Fall Damage Sound SmallSoundGet the Sound this entity will make when falling from a small height.
Forwards MovementFloatRetrieves the forwards movement direction of the entity.
Friction StateTriStateGets the friction state of this entity.
GlidingBooleanChecks to see if an entity is gliding, such as using an Elytra.
Hand RaisedEquipmentSlotGets the hand raised by this living entity.
Hand Raised TimeIntegerGet how long the entity's hands have been raised (Charging Bow attack, using a potion, etc)
HealthNumberGets the entity's health from 0 to getMaxHealth(), where 0 is dead.
Hurt DirectionFloatGets player hurt direction
Hurt SoundSoundGet the Sound this entity will make when damaged.
Item Use Remaining TimeIntegerGets remaining time a player needs to keep hands raised with an item to finish using it.
JumpingBooleanGet entity jump state.
KillerPlayerGets the player identified as the killer of the living entity.
Last DamageNumberReturns the living entity's last damage taken in the current no damage ticks time.
Leash HolderEntityGets the entity that is currently leading this entity.
LeashedBooleanReturns whether the entity is currently leashed.
Maximum AirIntegerReturns the maximum amount of air the living entity can have, in ticks.
Maximum No Damage TicksIntegerReturns the living entity's current maximum no damage ticks.
No Action TicksIntegerGet the ticks that this entity has performed no action.
No Damage TicksIntegerReturns the living entity's current no damage ticks.
Remaining AirIntegerReturns the amount of air that the living entity has remaining, in ticks.
Remove When Far AwayBooleanReturns if the living entity despawns when away from players or not.
RiptidingBooleanChecks to see if an entity is currently riptiding.
Sideways MovementFloatRetrieves the sideways movement direction of the entity.
SleepingBooleanReturns whether this entity is slumbering.
Sound PitchFloatGet the sound pitch at which this entity plays its sounds with.
Sound VolumeFloatGet the sound volume at which this entity plays its sounds with.
SwimmingBooleanChecks to see if an entity is swimming.
Upwards MovementFloatRetrieves the upwards movement direction of the entity.
Waypoint ColorColorGets the current color of the waypoint icon, if any.
As StringTextGet this entity as an NBT string.
Custom Name VisibleBooleanGets whether or not the mob's custom name is displayed client side.
DeadBooleanReturns true if this entity has been marked for removal.
EmptyBooleanCheck if a vehicle has passengers.
Entity IdIntegerReturns the network protocol ID for this entity.
Entity Spawn ReasonSpawnReason{@return the org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason that initially spawned this entity or null if not yet spawned}
FacingBlockFaceGet the closest cardinal BlockFace direction an entity is currently facing.
Fall DistanceFloatReturns the distance this entity has fallen
Fire TicksIntegerReturns the entity's current fire ticks (ticks before the entity stops being on fire).
Freeze Ticking LockedBooleanGets if the entity currently has its freeze ticks locked to a set amount.
Freeze TicksIntegerReturns the entity's current freeze ticks (amount of ticks the entity has been in powdered snow).
FrozenBooleanGets if the entity is fully frozen (it has been in powdered snow for max freeze ticks).
GlowingBooleanGets whether the entity is glowing or not.
HeightNumberGets the entity's height
In LavaBooleanCheck if entity is in lava
In Powdered SnowBooleanCheck if entity is inside powdered snow.
In RainBooleanCheck if entity is in rain
In WaterBooleanReturns true if the entity is in water.
In WorldBooleanChecks if this entity has been spawned in a world.
Inside VehicleBooleanReturns whether this entity is inside a vehicle.
InvisibleBooleanGets whether the entity is invisible or not.
InvulnerableBooleanGets whether the entity is invulnerable or not.
LocationLocationGets the entity's current position
Max Fire TicksIntegerReturns the entity's maximum fire ticks.
Max Freeze TicksIntegerReturns the entity's maximum freeze ticks (amount of ticks before it will be fully frozen)
NameTextGets the name of this command sender
On GroundBooleanReturns true if the entity is supported by a block.
OpBooleanChecks if this object is a server operator
OriginLocationGets the location where this entity originates from.
PassengersList<Entity>Gets a list of passengers of this vehicle.
PersistentBooleanReturns true if the entity gets persisted.
Pick Item StackItemGets the ItemStack that a player would select / create (in creative mode) when using the pick block action on this entity.
Piston Move ReactionPistonMoveReactionReturns the reaction of the entity when moved by a piston.
PitchFloatGets this entity's pitch
Portal CooldownIntegerGets the period of time (in ticks) before this entity can use a portal.
PosePoseGets the entity's current pose.
Removal ReasonRemovalReason{@return the reason this entity was removed}
Remove Event CauseCauseGets the cause used for this entity's remove event.
Scoreboard Entry NameTextGets the string name of the entity used to track it in Scoreboards.
Scoreboard TagsSet<Text>Returns a set of tags for this entity.
SilentBooleanGets whether the entity is silent or not.
SneakingBooleanReturns if the entity is in sneak mode
Sound CategorySoundCategoryGet the SoundCategory this entity will use when playing its sounds.
Spawn CategorySpawnCategoryGet the category of spawn to which this entity belongs.
Swim High Speed Splash SoundSoundGet the Sound this entity makes when splashing in water at high speeds.
Swim SoundSoundGet the Sound this entity makes while swimming.
Swim Splash SoundSoundGet the Sound this entity makes when splashing in water.
TickingBooleanCheck if entity is inside a ticking chunk
Ticks LivedIntegerGets the amount of ticks this entity has lived for.
Tracked BySet<Player>Get all players that are currently tracking this entity.
TypeEntity TypeGet the type of the entity.
Under WaterBooleanCheck if entity is underwater
Unique IdUUIDReturns a unique and persistent id for this entity
ValidBooleanReturns false if the entity has died, been despawned for some other reason, or has not been added to the world.
VehicleEntityGet the vehicle that this entity is inside.
VelocityVectorGets this entity's current velocity
Visible By DefaultBooleanGets whether or not this entity is visible by default.
Visual FireTriStateRetrieves the visual fire state of the entity.
WidthNumberGets the entity's width
WorldWorldGets the current world this entity resides in
XNumberGets the x-coordinate of this entity
YNumberGets the y-coordinate of this entity
YawFloatGets this entity's yaw
ZNumberGets the z-coordinate of this entity

Remove Potion Effect​

living_entity.remove_potion_effect

Removes any effects present of the given PotionEffectType.

InTypeWhat it is
Living EntityLiving EntityRepresents a living entity, such as a monster or player
TypePotion Effect Typethe potion type to remove

Goes on with: Next