Uses of Interface
org.bukkit.entity.Entity
Package | Description |
---|---|
org.bukkit |
The root package of the Bukkit API, contains generalized API classes.
|
org.bukkit.block |
Classes used to manipulate the voxels in a
world ,
including special states. |
org.bukkit.entity |
Interfaces for non-voxel objects that can exist in a
world , including all players, monsters, projectiles, etc. |
org.bukkit.entity.minecart |
Interfaces for various
Minecart types. |
org.bukkit.event.block | |
org.bukkit.event.entity | |
org.bukkit.event.hanging |
Events relating to entities that hang . |
org.bukkit.event.player | |
org.bukkit.event.vehicle |
Events relating to vehicular entities . |
org.bukkit.event.world | |
org.bukkit.inventory |
Classes involved in manipulating player inventories and item interactions.
|
org.bukkit.loot |
Classes relevant to loot table manipulation and generation.
|
org.bukkit.util |
Multi and single purpose classes to facilitate various programmatic
concepts.
|
org.spigotmc.event.entity |
Spigot-specific entity events.
|
-
Uses of Entity in org.bukkit
Methods in org.bukkit with type parameters of type Entity Modifier and Type Method Description <T extends Entity>
Collection<T>World. getEntitiesByClass(Class<T> cls)
Get a collection of all entities in this World matching the given class/interface<T extends Entity>
Collection<T>World. getEntitiesByClass(Class<T>... classes)
Deprecated.<T extends Entity>
TWorld. spawn(Location location, Class<T> clazz)
Spawn an entity of a specific class at the givenLocation
<T extends Entity>
TWorld. spawn(Location location, Class<T> clazz, Consumer<T> function)
Spawn an entity of a specific class at the givenLocation
, with the supplied function run before the entity is added to the world.Methods in org.bukkit that return Entity Modifier and Type Method Description Entity[]
Chunk. getEntities()
Get a list of all entities in the chunk.static Entity
Bukkit. getEntity(UUID uuid)
Gets an entity on the server by its UUIDEntity
Server. getEntity(UUID uuid)
Gets an entity on the server by its UUIDEntity
World. spawnEntity(Location loc, EntityType type)
Creates a entity at the givenLocation
Methods in org.bukkit that return types with arguments of type Entity Modifier and Type Method Description Class<? extends Entity>
EntityEffect. getApplicable()
Gets entity superclass which this affect is applicable to.List<Entity>
World. getEntities()
Get a list of all entities in this WorldCollection<Entity>
World. getEntitiesByClasses(Class<?>... classes)
Get a collection of all entities in this World matching any of the given classes/interfacesCollection<Entity>
World. getNearbyEntities(Location location, double x, double y, double z)
Returns a list of entities within a bounding box centered around a Location.Collection<Entity>
World. getNearbyEntities(Location location, double x, double y, double z, Predicate<Entity> filter)
Returns a list of entities within a bounding box centered around a Location.Collection<Entity>
World. getNearbyEntities(BoundingBox boundingBox)
Returns a list of entities within the given bounding box.Collection<Entity>
World. getNearbyEntities(BoundingBox boundingBox, Predicate<Entity> filter)
Returns a list of entities within the given bounding box.static List<Entity>
Bukkit. selectEntities(CommandSender sender, String selector)
Selects entities using the given Vanilla selector.List<Entity>
Server. selectEntities(CommandSender sender, String selector)
Selects entities using the given Vanilla selector.Methods in org.bukkit with parameters of type Entity Modifier and Type Method Description boolean
World. createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source)
Creates explosion at given coordinates with given power and optionally setting blocks on fire or breaking blocks.boolean
World. createExplosion(Location loc, float power, boolean setFire, boolean breakBlocks, Entity source)
Creates explosion at given coordinates with given power and optionally setting blocks on fire or breaking blocks.Method parameters in org.bukkit with type arguments of type Entity Modifier and Type Method Description Collection<Entity>
World. getNearbyEntities(Location location, double x, double y, double z, Predicate<Entity> filter)
Returns a list of entities within a bounding box centered around a Location.Collection<Entity>
World. getNearbyEntities(BoundingBox boundingBox, Predicate<Entity> filter)
Returns a list of entities within the given bounding box.RayTraceResult
World. rayTrace(Location start, Vector direction, double maxDistance, FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks, double raySize, Predicate<Entity> filter)
Performs a ray trace that checks for both block and entity collisions.RayTraceResult
World. rayTraceEntities(Location start, Vector direction, double maxDistance, double raySize, Predicate<Entity> filter)
Performs a ray trace that checks for entity collisions.RayTraceResult
World. rayTraceEntities(Location start, Vector direction, double maxDistance, Predicate<Entity> filter)
Performs a ray trace that checks for entity collisions. -
Uses of Entity in org.bukkit.block
Classes in org.bukkit.block with type parameters of type Entity Modifier and Type Interface Description interface
EntityBlockStorage<T extends Entity>
Represents a captured state of a block which stores entities.Methods in org.bukkit.block with parameters of type Entity Modifier and Type Method Description Collection<ItemStack>
Block. getDrops(ItemStack tool, Entity entity)
Returns a list of items which would drop by the entity destroying this block with a specific tool -
Uses of Entity in org.bukkit.entity
Subinterfaces of Entity in org.bukkit.entity Modifier and Type Interface Description interface
AbstractArrow
Represents an arrow.interface
AbstractHorse
Represents a Horse-like creature.interface
AbstractVillager
Represents a villager NPCinterface
Ageable
Represents an entity that can age and breed.interface
Ambient
Represents an ambient mobinterface
Animals
Represents an Animal.interface
AreaEffectCloud
Represents an area effect cloud which will imbue a potion effect onto entities which enter it.interface
ArmorStand
interface
Arrow
interface
Bat
Represents a Batinterface
Bee
Represents a Bee.interface
Blaze
Represents a Blaze monsterinterface
Boat
Represents a boat entity.interface
Boss
Represents the Boss Entity.interface
Cat
Meow.interface
CaveSpider
Represents a Spider.interface
ChestedHorse
Represents Horse-like creatures which can carry an inventory.interface
Chicken
Represents a Chicken.interface
Cod
Represents a cod fish.interface
ComplexEntityPart
Represents a single part of aComplexLivingEntity
interface
ComplexLivingEntity
Represents a complex living entity - one that is made up of various smaller partsinterface
Cow
Represents a Cow.interface
Creature
Represents a Creature.interface
Creeper
Represents a Creeperinterface
Damageable
Represents anEntity
that has health and can take damage.interface
Dolphin
interface
Donkey
Represents a Donkey - variant ofChestedHorse
.interface
DragonFireball
interface
Drowned
Drowned zombie.interface
Egg
Represents a thrown egg.interface
ElderGuardian
Represents an ElderGuardian - variant ofGuardian
.interface
EnderCrystal
A crystal that heals nearby EnderDragonsinterface
EnderDragon
Represents an Ender Dragoninterface
EnderDragonPart
Represents an ender dragon partinterface
Enderman
Represents an Enderman.interface
Endermite
interface
EnderPearl
Represents a thrown Ender Pearl entityinterface
EnderSignal
Represents an EnderSignal, which is created upon throwing an ender eye.interface
Evoker
Represents an Evoker "Illager".interface
EvokerFangs
Represents Evoker Fangs.interface
ExperienceOrb
Represents an Experience Orb.interface
Explosive
A representation of an explosive entityinterface
FallingBlock
Represents a falling blockinterface
Fireball
Represents a Fireball.interface
Firework
interface
Fish
Represents a fish entity.interface
FishHook
Represents a fishing hook.interface
Flying
Represents a Flying Entity.interface
Fox
What does the fox say?interface
Ghast
Represents a Ghast.interface
Giant
Represents a Giant.interface
Golem
A mechanical creature that may harm enemies.interface
Guardian
interface
Hanging
Represents a Hanging entityinterface
Hoglin
Represents a Hoglin.interface
Horse
Represents a Horse.interface
HumanEntity
Represents a human entity, such as an NPC or a playerinterface
Husk
Represents a Husk - variant ofZombie
.interface
Illager
Represents a type of "Illager".interface
Illusioner
Represents an Illusioner "Illager".interface
IronGolem
An iron Golem that protects Villages.interface
Item
Represents a dropped item.interface
ItemFrame
Represents an Item Frameinterface
LargeFireball
Represents a largeFireball
interface
LeashHitch
Represents a Leash Hitch on a fenceinterface
LightningStrike
Represents an instance of a lightning strike.interface
LingeringPotion
Deprecated.lingering status depends on only on the potion item.interface
LivingEntity
Represents a living entity, such as a monster or playerinterface
Llama
Represents a Llama.interface
LlamaSpit
Represents Llama spit.interface
MagmaCube
Represents a MagmaCube.interface
Minecart
Represents a minecart entity.interface
Mob
Represents a Mob.interface
Monster
Represents a Monster.interface
Mule
Represents a Mule - variant ofChestedHorse
.interface
MushroomCow
Represents a mushroomCow
interface
NPC
Represents a non-player characterinterface
Ocelot
A wild tameable catinterface
Painting
Represents a Painting.interface
Panda
Panda entity.interface
Parrot
Represents a Parrot.interface
Phantom
Represents a phantom.interface
Pig
Represents a Pig.interface
Piglin
Represents a Piglin.interface
PigZombie
Represents a Pig Zombie.interface
Pillager
Illager entity.interface
Player
Represents a player, connected or notinterface
PolarBear
Represents a polar bear.interface
Projectile
Represents a shootable entity.interface
PufferFish
Represents a puffer fish.interface
Rabbit
interface
Raider
interface
Ravager
Illager beast.interface
Salmon
Represents a salmon fish.interface
Sheep
Represents a Sheep.interface
Shulker
interface
ShulkerBullet
interface
Silverfish
Represents a Silverfish.interface
SizedFireball
Represents a sized fireball.interface
Skeleton
Represents a Skeleton.interface
SkeletonHorse
Represents a SkeletonHorse - variant ofAbstractHorse
.interface
Slime
Represents a Slime.interface
SmallFireball
Represents a smallFireball
interface
Snowball
Represents a snowball.interface
Snowman
Represents a snowman entityinterface
SpectralArrow
Represents a spectral arrow.interface
Spellcaster
Represents a spell casting "Illager".interface
Spider
Represents a Spider.interface
SplashPotion
Deprecated.splash status depends on only on the potion item.interface
Squid
Represents a Squid.interface
Steerable
Represents an entity which may be saddled, ridden and steered using an item.interface
Stray
Represents a Stray - variant ofSkeleton
.interface
Strider
Represents a Strider.interface
Tameable
interface
ThrowableProjectile
interface
ThrownExpBottle
Represents a thrown Experience bottle.interface
ThrownPotion
Represents a thrown potion bottleinterface
TippedArrow
Deprecated.tipped status depends only on base potion type not being UNCRAFTABLE and effects being empty.interface
TNTPrimed
Represents a Primed TNT.interface
TraderLlama
Represents a trader Llama.interface
Trident
Represents a thrown trident.interface
TropicalFish
Tropical fish.interface
Turtle
Represents a turtle.interface
Vehicle
Represents a vehicle entity.interface
Vex
Represents a Vex.interface
Villager
Represents a villager NPCinterface
Vindicator
Represents a Vindicator.interface
WanderingTrader
Represents a wandering trader NPCinterface
WaterMob
Represents a Water Mobinterface
Witch
Represents a Witchinterface
Wither
Represents a Wither bossinterface
WitherSkeleton
Represents a WitherSkeleton - variant ofSkeleton
.interface
WitherSkull
Represents a wither skullFireball
.interface
Wolf
Represents a Wolfinterface
Zoglin
Represents a Zoglin.interface
Zombie
Represents a Zombie.interface
ZombieHorse
Represents a ZombieHorse - variant ofAbstractHorse
.interface
ZombieVillager
Methods in org.bukkit.entity that return Entity Modifier and Type Method Description Entity
LivingEntity. getLeashHolder()
Gets the entity that is currently leading this entity.Entity
Entity. getPassenger()
Deprecated.entities may have multiple passengers, usegetPassengers()
Entity
HumanEntity. getShoulderEntityLeft()
Deprecated.There are currently no well defined semantics regarding serialized entities in Bukkit.Entity
HumanEntity. getShoulderEntityRight()
Deprecated.There are currently no well defined semantics regarding serialized entities in Bukkit.Entity
TNTPrimed. getSource()
Gets the source of this primed TNT.Entity
Player. getSpectatorTarget()
Gets the entity which is followed by the camera when inGameMode.SPECTATOR
.Entity
ShulkerBullet. getTarget()
Retrieve the target of this bullet.Entity
Entity. getVehicle()
Get the vehicle that this player is inside.Methods in org.bukkit.entity that return types with arguments of type Entity Modifier and Type Method Description Class<? extends Entity>
EntityType. getEntityClass()
List<Entity>
Entity. getNearbyEntities(double x, double y, double z)
Returns a list of entities within a bounding box centered around this entityList<Entity>
Entity. getPassengers()
Gets a list of passengers of this vehicle.Methods in org.bukkit.entity with parameters of type Entity Modifier and Type Method Description boolean
Entity. addPassenger(Entity passenger)
Add a passenger to the vehicle.void
LivingEntity. attack(Entity target)
Makes this entity attack the given entity with a melee attack.void
Damageable. damage(double amount, Entity source)
Deals the given amount of damage to this entity, from a specified entity.boolean
LivingEntity. hasLineOfSight(Entity other)
Checks whether the living entity has block line of sight to another.boolean
Entity. removePassenger(Entity passenger)
Remove a passenger from the vehicle.boolean
LivingEntity. setLeashHolder(Entity holder)
Sets the leash on this entity to be held by the supplied entity.boolean
Entity. setPassenger(Entity passenger)
Deprecated.entities may have multiple passengers, usegetPassengers()
void
HumanEntity. setShoulderEntityLeft(Entity entity)
Deprecated.There are currently no well defined semantics regarding serialized entities in Bukkit.void
HumanEntity. setShoulderEntityRight(Entity entity)
Deprecated.There are currently no well defined semantics regarding serialized entities in Bukkit.void
Player. setSpectatorTarget(Entity entity)
Sets the entity which is followed by the camera when inGameMode.SPECTATOR
.void
ShulkerBullet. setTarget(Entity target)
Sets the target of this bulletboolean
Entity. teleport(Entity destination)
Teleports this entity to the target Entity.boolean
Entity. teleport(Entity destination, PlayerTeleportEvent.TeleportCause cause)
Teleports this entity to the target Entity. -
Uses of Entity in org.bukkit.entity.minecart
Subinterfaces of Entity in org.bukkit.entity.minecart Modifier and Type Interface Description interface
CommandMinecart
interface
ExplosiveMinecart
Represents a Minecart with TNT inside it that can explode when triggered.interface
HopperMinecart
Represents a Minecart with a Hopper inside itinterface
PoweredMinecart
Represents a powered minecart.interface
RideableMinecart
Represents a minecart that can have certainentities
as passengers.interface
SpawnerMinecart
Represents a Minecart with anentity spawner
inside it.interface
StorageMinecart
Represents a minecart with a chest. -
Uses of Entity in org.bukkit.event.block
Methods in org.bukkit.event.block that return Entity Modifier and Type Method Description Entity
BlockShearEntityEvent. getEntity()
Gets the entity that was sheared.Entity
CauldronLevelChangeEvent. getEntity()
Get entity which did this.Entity
EntityBlockFormEvent. getEntity()
Get the entity that formed the block.Entity
BlockIgniteEvent. getIgnitingEntity()
Gets the entity who ignited this blockConstructors in org.bukkit.event.block with parameters of type Entity Constructor Description BlockIgniteEvent(Block theBlock, BlockIgniteEvent.IgniteCause cause, Entity ignitingEntity)
BlockIgniteEvent(Block theBlock, BlockIgniteEvent.IgniteCause cause, Entity ignitingEntity, Block ignitingBlock)
BlockShearEntityEvent(Block dispenser, Entity sheared, ItemStack tool)
CauldronLevelChangeEvent(Block block, Entity entity, CauldronLevelChangeEvent.ChangeReason reason, int oldLevel, int newLevel)
EntityBlockFormEvent(Entity entity, Block block, BlockState blockstate)
-
Uses of Entity in org.bukkit.event.entity
Fields in org.bukkit.event.entity declared as Entity Modifier and Type Field Description protected Entity
EntityEvent. entity
Methods in org.bukkit.event.entity that return Entity Modifier and Type Method Description Entity
EntityCombustByEntityEvent. getCombuster()
Get the entity that caused the combustion event.Entity
EntityDamageByEntityEvent. getDamager()
Returns the entity that damaged the defender.Entity
EntityEvent. getEntity()
Returns the Entity involved in this eventEntity
PlayerLeashEntityEvent. getEntity()
Returns the entity being leashed.Entity
ProjectileHitEvent. getHitEntity()
Gets the entity that was hit, if it was an entity that was hit.Entity
PlayerLeashEntityEvent. getLeashHolder()
Returns the entity that is holding the leash.Entity
EntityShootBowEvent. getProjectile()
Gets the projectile which will be launched by this eventEntity
EntityTargetEvent. getTarget()
Get the entity that this is targeting.Entity
PigZombieAngerEvent. getTarget()
Gets the entity (if any) which triggered this anger update.Entity
EntityTransformEvent. getTransformedEntity()
Gets the entity that the original entity was transformed to.Methods in org.bukkit.event.entity that return types with arguments of type Entity Modifier and Type Method Description List<Entity>
EntityTransformEvent. getTransformedEntities()
Gets the entities that the original entity was transformed to.Methods in org.bukkit.event.entity with parameters of type Entity Modifier and Type Method Description void
EntityShootBowEvent. setProjectile(Entity projectile)
Replaces the projectile which will be launchedvoid
EntityTargetEvent. setTarget(Entity target)
Set the entity that you want the mob to target instead.void
EntityTargetLivingEntityEvent. setTarget(Entity target)
Set the Entity that you want the mob to target.Constructor parameters in org.bukkit.event.entity with type arguments of type Entity Constructor Description EntityTransformEvent(Entity original, List<Entity> convertedList, EntityTransformEvent.TransformReason transformReason)
-
Uses of Entity in org.bukkit.event.hanging
Methods in org.bukkit.event.hanging that return Entity Modifier and Type Method Description Entity
HangingBreakByEntityEvent. getRemover()
Gets the entity that removed the hanging entity.Constructors in org.bukkit.event.hanging with parameters of type Entity Constructor Description HangingBreakByEntityEvent(Hanging hanging, Entity remover)
HangingBreakByEntityEvent(Hanging hanging, Entity remover, HangingBreakEvent.RemoveCause cause)
-
Uses of Entity in org.bukkit.event.player
Fields in org.bukkit.event.player declared as Entity Modifier and Type Field Description protected Entity
PlayerInteractEntityEvent. clickedEntity
Methods in org.bukkit.event.player that return Entity Modifier and Type Method Description Entity
PlayerFishEvent. getCaught()
Gets the entity caught by the player.Entity
PlayerShearEntityEvent. getEntity()
Gets the entity the player is shearingEntity
PlayerInteractEntityEvent. getRightClicked()
Gets the entity that was right-clicked by the player.Constructors in org.bukkit.event.player with parameters of type Entity Constructor Description PlayerFishEvent(Player player, Entity entity, FishHook hookEntity, PlayerFishEvent.State state)
PlayerInteractAtEntityEvent(Player who, Entity clickedEntity, Vector position)
PlayerInteractAtEntityEvent(Player who, Entity clickedEntity, Vector position, EquipmentSlot hand)
PlayerInteractEntityEvent(Player who, Entity clickedEntity)
PlayerInteractEntityEvent(Player who, Entity clickedEntity, EquipmentSlot hand)
PlayerShearEntityEvent(Player who, Entity what)
Deprecated.PlayerShearEntityEvent(Player who, Entity what, ItemStack item, EquipmentSlot hand)
PlayerUnleashEntityEvent(Entity entity, Player player)
-
Uses of Entity in org.bukkit.event.vehicle
Methods in org.bukkit.event.vehicle that return Entity Modifier and Type Method Description Entity
VehicleDamageEvent. getAttacker()
Gets the Entity that is attacking the vehicleEntity
VehicleDestroyEvent. getAttacker()
Gets the Entity that has destroyed the vehicle, potentially nullEntity
VehicleEnterEvent. getEntered()
Gets the Entity that entered the vehicle.Entity
VehicleEntityCollisionEvent. getEntity()
Constructors in org.bukkit.event.vehicle with parameters of type Entity Constructor Description VehicleDamageEvent(Vehicle vehicle, Entity attacker, double damage)
VehicleDestroyEvent(Vehicle vehicle, Entity attacker)
VehicleEnterEvent(Vehicle vehicle, Entity entered)
VehicleEntityCollisionEvent(Vehicle vehicle, Entity entity)
-
Uses of Entity in org.bukkit.event.world
Methods in org.bukkit.event.world that return Entity Modifier and Type Method Description Entity
LootGenerateEvent. getEntity()
Get the entity used as context for loot generation (if applicable).Entity
PortalCreateEvent. getEntity()
Returns the Entity that triggered this portal creation (if available)Constructors in org.bukkit.event.world with parameters of type Entity Constructor Description LootGenerateEvent(World world, Entity entity, InventoryHolder inventoryHolder, LootTable lootTable, LootContext lootContext, List<ItemStack> items, boolean plugin)
PortalCreateEvent(List<BlockState> blocks, World world, Entity entity, PortalCreateEvent.CreateReason reason)
-
Uses of Entity in org.bukkit.inventory
Methods in org.bukkit.inventory that return Entity Modifier and Type Method Description Entity
EntityEquipment. getHolder()
Get the entity this EntityEquipment belongs to -
Uses of Entity in org.bukkit.loot
Methods in org.bukkit.loot that return Entity Modifier and Type Method Description Entity
LootContext. getLootedEntity()
Get theEntity
that was killed.Methods in org.bukkit.loot with parameters of type Entity Modifier and Type Method Description LootContext.Builder
LootContext.Builder. lootedEntity(Entity lootedEntity)
The entity that was killed. -
Uses of Entity in org.bukkit.util
Methods in org.bukkit.util that return Entity Modifier and Type Method Description Entity
RayTraceResult. getHitEntity()
Gets the hit entity.Constructors in org.bukkit.util with parameters of type Entity Constructor Description RayTraceResult(Vector hitPosition, Entity hitEntity)
Creates a RayTraceResult.RayTraceResult(Vector hitPosition, Entity hitEntity, BlockFace hitBlockFace)
Creates a RayTraceResult. -
Uses of Entity in org.spigotmc.event.entity
Methods in org.spigotmc.event.entity that return Entity Modifier and Type Method Description Entity
EntityDismountEvent. getDismounted()
Entity
EntityMountEvent. getMount()
Constructors in org.spigotmc.event.entity with parameters of type Entity Constructor Description EntityDismountEvent(Entity what, Entity dismounted)
EntityMountEvent(Entity what, Entity mount)