接口的使用
org.bukkit.entity.Entity
程序包
说明
Bukkit API的顶级程序包, 包含通用的API类和接口.
用于操作在
世界
内的三位像素(方块),包括一些特定的状态.Classes concerning damage types and sources applicable to living entities.
为在
世界
内存在的非三维像素单位(实体)提供的接口,包含玩家、怪物、抛射物等.为不同种类的
矿车
提供的接口.参与操作玩家物品栏和物品交互的类.
与战利品表产生与操作有关的类 (Minecraft Wiki - 战利品表).
Classes related to creating or using
structures
without creating Structure
blocks
in the world.提供多种目的和单一目的的类以简化各种编程概念.
-
org.bukkit中Entity的使用
修饰符和类型方法说明<T extends Entity>
TRegionAccessor.addEntity
(T entity) Spawns a previously created entity in the world.<T extends Entity>
TRegionAccessor.createEntity
(@NotNull Location location, @NotNull Class<T> clazz) Creates an entity of a specific class at the givenLocation
but does not spawn it in the world.<T extends Entity>
@NotNull Collection<T>RegionAccessor.getEntitiesByClass
(@NotNull Class<T> cls) Get a collection of all entities in this RegionAccessor matching the given class/interface<T extends Entity>
@NotNull Collection<T>World.getEntitiesByClass
(@NotNull Class<T> cls) 获取一个在这个世界的所有与指定的类/接口相匹配的实体的集合.<T extends Entity>
@NotNull Collection<T>World.getEntitiesByClass
(@NotNull Class<T>... classes) 已过时。<T extends Entity>
T在指定的位置
根据给定的类生成一个实体.<T extends Entity>
TRegionAccessor.spawn
(@NotNull Location location, @NotNull Class<T> clazz, boolean randomizeData, @Nullable Consumer<? super T> function) Creates a new entity at the givenLocation
with the supplied function run before the entity is added to the world.<T extends Entity>
TRegionAccessor.spawn
(@NotNull Location location, @NotNull Class<T> clazz, @Nullable Consumer<? super 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.修饰符和类型方法说明Chunk.getEntities()
获取该区块内的所有实体.用UUID获取实体.用UUID获取实体.Vibration.Destination.EntityDestination.getEntity()
RegionAccessor.spawnEntity
(@NotNull Location location, @NotNull EntityType type) 在指定的位置
创建一个实体.RegionAccessor.spawnEntity
(@NotNull Location loc, @NotNull EntityType type, boolean randomizeData) Creates a new entity at the givenLocation
.修饰符和类型方法说明EntityEffect.getApplicable()
获取该效果能应用到的实体超类.RegionAccessor.getEntities()
Get a list of all entities in this RegionAccessorWorld.getEntities()
获取一个这个世界所有实体的列表.RegionAccessor.getEntitiesByClasses
(@NotNull Class<?>... classes) Get a collection of all entities in this RegionAccessor matching any of the given classes/interfacesWorld.getEntitiesByClasses
(@NotNull Class<?>... classes) 获取一个在这个世界的所有与任一指定的类/接口相匹配的实体的集合.World.getNearbyEntities
(@NotNull Location location, double x, double y, double z) 返回一个以这个位置为中心的包围着的所有实体的列表(译注:这个可能不太好理解,就是在这个位置,按指定的搜索范围,搜索这个范围里的所有实体).World.getNearbyEntities
(@NotNull Location location, double x, double y, double z, @Nullable Predicate<? super Entity> filter) Returns a list of entities within a bounding box centered around a Location.World.getNearbyEntities
(@NotNull BoundingBox boundingBox) Returns a list of entities within the given bounding box.World.getNearbyEntities
(@NotNull BoundingBox boundingBox, @Nullable Predicate<? super Entity> filter) Returns a list of entities within the given bounding box.Bukkit.selectEntities
(@NotNull CommandSender sender, @NotNull String selector) 以给定的原版选择器选择筛选实体.Server.selectEntities
(@NotNull CommandSender sender, @NotNull String selector) Selects entities using the given Vanilla selector.修饰符和类型方法说明boolean
World.createExplosion
(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, @Nullable Entity source) Creates explosion at given coordinates with given power and optionally setting blocks on fire or breaking blocks.boolean
World.createExplosion
(@NotNull Location loc, float power, boolean setFire, boolean breakBlocks, @Nullable Entity source) Creates explosion at given coordinates with given power and optionally setting blocks on fire or breaking blocks.boolean
EntityEffect.isApplicableTo
(@NotNull Entity entity) Checks if this effect is applicable to the given entity.boolean
Checks if a given entity is frozen.void
Play a Sound at the location of the provided entity in the World.void
World.playSound
(@NotNull Entity entity, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch) Play a Sound at the location of the provided entity in the World.void
World.playSound
(@NotNull Entity entity, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch, long seed) Play a Sound at the location of the provided entity in the World.void
Play a Sound at the location of the provided entity in the World.void
World.playSound
(@NotNull Entity entity, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch) Play a Sound at the location of the provided entity in the World.void
World.playSound
(@NotNull Entity entity, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch, long seed) Play a Sound at the location of the provided entity in the World.修饰符和类型方法说明World.getNearbyEntities
(@NotNull Location location, double x, double y, double z, @Nullable Predicate<? super Entity> filter) Returns a list of entities within a bounding box centered around a Location.World.getNearbyEntities
(@NotNull BoundingBox boundingBox, @Nullable Predicate<? super Entity> filter) Returns a list of entities within the given bounding box.boolean
EntityEffect.isApplicableTo
(@NotNull Class<? extends Entity> clazz) Checks if this effect is applicable to the given entity class.World.rayTrace
(@NotNull Location start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks, double raySize, @Nullable Predicate<? super Entity> filter) 执行射线跟踪, 检查方块碰撞和实体碰撞.World.rayTraceEntities
(@NotNull Location start, @NotNull Vector direction, double maxDistance, double raySize, @Nullable Predicate<? super Entity> filter) 执行检查实体碰撞的射线跟踪.World.rayTraceEntities
(@NotNull Location start, @NotNull Vector direction, double maxDistance, @Nullable Predicate<? super Entity> filter) 执行检查实体碰撞的射线跟踪. -
org.bukkit.block中Entity的使用
修饰符和类型方法说明TrialSpawner.getTrackedEntities()
Gets a list of entities this spawner is currently tracking.修饰符和类型方法说明返回当某实体使用某工具破坏此方块时掉落的物品.boolean
TrialSpawner.isTrackingEntity
(@NotNull Entity entity) Checks if this spawner is currently tracking the provided entity.boolean
Ring this bell in the direction that the bell is facing.boolean
Ring this bell.void
TrialSpawner.startTrackingEntity
(@NotNull Entity entity) Force this spawner to start tracking the provided entity.void
TrialSpawner.stopTrackingEntity
(@NotNull Entity entity) Force this spawner to stop tracking the provided entity. -
org.bukkit.damage中Entity的使用
修饰符和类型方法说明DamageSource.getCausingEntity()
Get theEntity
that caused the damage to occur.DamageSource.getDirectEntity()
Get theEntity
that directly caused the damage.修饰符和类型方法说明DamageSource.Builder.withCausingEntity
(@NotNull Entity entity) Set theEntity
that caused the damage.DamageSource.Builder.withDirectEntity
(@NotNull Entity entity) Set theEntity
that directly inflicted the damage. -
org.bukkit.entity中Entity的使用
修饰符和类型接口说明interface
代表一支箭.interface
代表一个马基对象.interface
This interface defines or represents the abstract concept of skeleton-like entities on the server.interface
代表一个抽象村民NPC.interface
Represents a Wind Charge.interface
代表一个有年龄的实体.interface
An Allay.interface
代表环境生物(目前只有蝙蝠属于这一行列).interface
代表动物.interface
代表一片即将对处于其中的生物施加药水效果的区域效果云 (即喷溅药水使用后形成的雾).interface
Represents an Armadillo.interface
interface
表示一只箭矢.interface
An Axolotl.interface
表示一只蝙蝠.interface
代表蜜蜂.interface
代表烈焰人怪物.interface
Represents a block display entity.interface
代表船实体interface
Represents a Bogged Skeleton.interface
代表一个Boss实体.interface
代表一个有年龄和繁殖能力的实体.interface
Represents a Breeze.interface
Represents a Wind Charge.interface
代表一只骆驼interface
喵.interface
代表蜘蛛(洞穴蜘蛛).interface
ABoat
with a chest.interface
代表一个可以携带物品的类马生物.interface
代表鸡.interface
代表鳕鱼.interface
代表ComplexLivingEntity
的一部分.interface
代表复杂生物 --- 由多种较小实体部分组成 (目前只有末影龙属于此行列).interface
代表牛.interface
代表一类生物.interface
代表苦力怕.interface
表示一个有生命值和可以被伤害的实体(Entity
)。interface
Represents a display entity which is designed to only have a visual function.interface
这是海豚~interface
代表驴 -ChestedHorse
的变种.interface
恶龙咆哮, 哇呜~(指末影龙火球)interface
溺尸.interface
我创造了生命?interface
代表远古守卫者 - 一种守卫者
.interface
一个末影水晶,能治疗附近的末影龙interface
代表末影龙.interface
代表末影龙的组成部分interface
代表末影人.interface
名副其实的小不点 - 末影螨.interface
代表抛出的末影珍珠实体.interface
代表抛出的末影之眼.interface
Represents an Enemyinterface
代表唤魔者.interface
代表唤魔者召唤的尖牙.interface
代表一个经验球.interface
代表可爆炸的实体.interface
代表一个下落方块.interface
代表一个火球.interface
烟花火箭实体.interface
已过时。interface
代表一个鱼钩.interface
代表能飞行的实体.interface
代表狐狸.interface
A Frog.interface
代表恶魂.interface
代表巨人.interface
A Glow Item Frame.interface
A Glow Squid.interface
A Goat.interface
一个可以伤害敌人的傀儡.interface
守卫海底遗迹的守卫者们.interface
代表悬挂实体.interface
Represents a Hoglin.interface
代表一匹马.interface
代表人类实体, 比如一个NPC或一名玩家interface
代表一具尸壳 -Zombie
的变异体.interface
代表一种"灾厄村民" (亦称刌民), 包含卫道士、女巫等.interface
代表幻术师实体.interface
Represents an entity designed to only record interactions.interface
村民守卫者——铁傀儡.interface
代表掉落物实体.interface
Represents an item display entity.interface
代表物品展示框.interface
代表大的火球(Fireball
).interface
跟随主人, 那是因为我被设定成这样啊~ (代表系在栅栏上的拴绳).interface
代表雷击的实例,可能会或者不会造成伤害。interface
已过时。滞留状态仅取决于药水物品/lingering status depends on only on the potion item.interface
代表一个生物实体,比如一只怪物或一名玩家.interface
表示一只羊驼.interface
代表羊驼唾沫.interface
代表岩浆怪.interface
A Marker entity, exists only on the server.interface
代表矿车实体.interface
Represents a Mob.interface
代表怪物.interface
代表骡子 -ChestedHorse
的变种.interface
代表哞菇(Cow
).interface
代表非玩家角色.interface
代表豹猫.interface
Represents an ominous item spawner.interface
代表画.interface
代表熊猫.interface
代表鹦鹉.interface
代表幻翼.interface
代表猪.interface
Represents a Piglin.interface
Piglin / Piglin Brute.interface
Represents a Piglin Brute.interface
代表僵尸猪人.interface
掠夺者实体.interface
玩家对象interface
代表北极熊.interface
表示可被射击实体的概念interface
Represents a puffer fish.interface
interface
interface
劫掠兽实体.interface
Represents a salmon fish.interface
代表羊.interface
interface
interface
代表蠹虫.interface
Represents a sized fireball.interface
代表骷髅.interface
Represents a SkeletonHorse - variant ofAbstractHorse
.interface
代表史莱姆.interface
代表小的火球(Fireball
).interface
Represents a Sniffer.interface
代表雪球.interface
代表雪人实体.interface
Represents a spectral arrow.interface
代表会施法的灾厄村民 (目前只有唤魔者和幻术师).interface
代表蜘蛛.interface
已过时。splash status depends on only on the potion item.interface
代表鱿鱼.interface
Represents an entity which may be saddled, ridden and steered using an item.interface
Represents a Stray - variant ofAbstractSkeleton
.interface
Represents a Strider.interface
A babyFrog
.interface
interface
Represents a text display entity.interface
interface
代表抛出的附魔之瓶.interface
代表一个被抛出的药水瓶.interface
已过时。tipped status depends only on base potion type not being UNCRAFTABLE and effects being empty.interface
Represents a Primed TNT.interface
Represents a trader Llama.interface
代表被抛出的三叉戟.interface
代表热带鱼.interface
Represents a turtle.interface
Represents a vehicle entity.interface
恼鬼.interface
Represents a villager NPCinterface
代表卫道士.interface
Represents a wandering trader NPCinterface
监守者.interface
代表海洋生物.interface
Represents a Wind Charge.interface
代表女巫.interface
代表凋零boss.interface
Represents a WitherSkeleton - variant ofAbstractSkeleton
.interface
代表凋零之首.interface
代表狼.interface
Represents a Zoglin.interface
代表僵尸.interface
Represents a ZombieHorse - variant ofAbstractHorse
.interface
修饰符和类型方法说明Entity.copy()
Creates a copy of this entity and all its data.Creates a copy of this entity and all its data.EntitySnapshot.createEntity
(@NotNull Location to) Creates an entity using this template and spawns it at the provided location.EntitySnapshot.createEntity
(@NotNull World world) Creates an entity using this template.FishHook.getHookedEntity()
Get the entity hooked by this fish hook.Creeper.getIgniter()
获取点燃此苦力怕的实体(如存在).LivingEntity.getLeashHolder()
获取当前牵引此实体的实体.Entity.getPassenger()
已过时。实体可能有多名乘客.HumanEntity.getShoulderEntityLeft()
已过时。Bukkit中目前还没有关于序列化实体的语义(格式)的良好定义.HumanEntity.getShoulderEntityRight()
已过时。Bukkit中目前还没有关于序列化实体的语义(格式)的良好定义.TNTPrimed.getSource()
Gets the source of this primed TNT.Player.getSpectatorTarget()
获取旁观者模式下镜头跟随的实体.ShulkerBullet.getTarget()
Retrieve the target of this bullet.Frog.getTongueTarget()
Gets the tongue target of this frog.Entity.getVehicle()
获取实体所在的载具, 若没有则返回null.修饰符和类型方法说明EntityType.getEntityClass()
Entity.getNearbyEntities
(double x, double y, double z) 返回以此实体为中心的边界框内的所有实体.Entity.getPassengers()
获取载具的乘客列表.修饰符和类型方法说明boolean
Entity.addPassenger
(@NotNull Entity passenger) 添加一名乘客.void
让此实体对指定实体进行近战攻击。boolean
Checks to see if an entity has been visually hidden from this player.void
Warden.clearAnger
(@NotNull Entity entity) Clears the anger level of this warden.void
强制某实体伤害这个实体
.int
Gets the anger level of this warden.boolean
LivingEntity.hasLineOfSight
(@NotNull Entity other) 检查生物实体是否阻挡另一个的视线.void
Player.hideEntity
(@NotNull Plugin plugin, @NotNull Entity entity) 从视觉上隐藏一个实体.void
点燃此苦力怕, 开始其爆炸计时.void
Warden.increaseAnger
(@NotNull Entity entity, int increase) Increases the anger level of this warden.void
Play a sound for a player at the location of the entity.void
Player.playSound
(@NotNull Entity entity, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch) Play a sound for a player at the location of the entity.void
Player.playSound
(@NotNull Entity entity, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch, long seed) Play a sound for a player at the location of the entity.void
Play a sound for a player at the location of the entity.void
Player.playSound
(@NotNull Entity entity, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch) Play a sound for a player at the location of the entity.void
Player.playSound
(@NotNull Entity entity, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch, long seed) Play a sound for a player at the location of the entity.boolean
Entity.removePassenger
(@NotNull Entity passenger) 移除一名乘客.void
Player.sendBlockDamage
(@NotNull Location loc, float progress, @NotNull Entity source) Send block damage.void
Sets the anger level of this warden.void
FishHook.setHookedEntity
(@Nullable Entity entity) Set the entity hooked by this fish hook.boolean
LivingEntity.setLeashHolder
(@Nullable Entity holder) 设置握持拴绳的实体.boolean
Entity.setPassenger
(@NotNull Entity passenger) 已过时。实体可能有多名乘客.void
HumanEntity.setShoulderEntityLeft
(@Nullable Entity entity) 已过时。Bukkit中目前还没有关于序列化实体的语义(格式)的良好定义.void
HumanEntity.setShoulderEntityRight
(@Nullable Entity entity) 已过时。Bukkit中目前还没有关于序列化实体的语义(格式)的良好定义.void
Sets the source of this primed TNT.void
Player.setSpectatorTarget
(@Nullable Entity entity) 设置模式下镜头跟随的实体.void
Sets the target of this bulletvoid
Frog.setTongueTarget
(@Nullable Entity target) Sets the tongue target of this frog.void
Player.showEntity
(@NotNull Plugin plugin, @NotNull Entity entity) Allows this player to see an entity that was previously hidden.boolean
将此实体传送到目标实体.boolean
Entity.teleport
(@NotNull Entity destination, @NotNull PlayerTeleportEvent.TeleportCause cause) 将此实体传送到目标实体.boolean
Enderman.teleportTowards
(@NotNull Entity entity) Randomly teleports the Enderman towards the givenentity
. -
org.bukkit.entity.minecart中Entity的使用
修饰符和类型接口说明interface
代表命令方块矿车.interface
代表TNT矿车,可以被引爆.interface
代表漏斗矿车.interface
代表动力矿车.当玩家往动力矿车里放燃料
后它就会自己移动.interface
代表可乘坐的矿车.interface
代表有刷怪箱
在里面的矿车(即刷怪箱矿车).interface
代表运输矿车,你可以使用InventoryHolder
里的方法来访问. -
org.bukkit.event.block中Entity的使用
修饰符和类型方法说明BellRingEvent.getEntity()
Get theEntity
that rang the bell (if there was one).BlockReceiveGameEvent.getEntity()
获取触发此事件的实体(如果存在).BlockShearEntityEvent.getEntity()
获取被剪的实体.CauldronLevelChangeEvent.getEntity()
获取触发本事件的实体,值有可能为null.EntityBlockFormEvent.getEntity()
获取被建造的实体.BlockIgniteEvent.getIgnitingEntity()
获取点燃方块的实体.TNTPrimeEvent.getPrimingEntity()
Get the entity that caused the TNT to be primed.限定符构造器说明BlockIgniteEvent
(@NotNull Block theBlock, @NotNull BlockIgniteEvent.IgniteCause cause, @Nullable Entity ignitingEntity) BlockIgniteEvent
(@NotNull Block theBlock, @NotNull BlockIgniteEvent.IgniteCause cause, @Nullable Entity ignitingEntity, @Nullable Block ignitingBlock) CauldronLevelChangeEvent
(@NotNull Block block, @Nullable Entity entity, @NotNull CauldronLevelChangeEvent.ChangeReason reason, @NotNull BlockState newBlock) EntityBlockFormEvent
(@NotNull Entity entity, @NotNull Block block, @NotNull BlockState blockstate) TNTPrimeEvent
(@NotNull Block block, @NotNull TNTPrimeEvent.PrimeCause igniteCause, @Nullable Entity primingEntity, @Nullable Block primingBlock) -
org.bukkit.event.entity中Entity的使用
修饰符和类型方法说明EntityCombustByEntityEvent.getCombuster()
返回造成燃烧的实体.EntityDamageByEntityEvent.getDamager()
返回造成这次伤害的实体EntityDismountEvent.getDismounted()
Gets the entity which will no longer be ridden.EntityEvent.getEntity()
返回这个事件所涉及的实体.PlayerLeashEntityEvent.getEntity()
Returns the entity being leashed.ProjectileHitEvent.getHitEntity()
Gets the entity that was hit, if it was an entity that was hit.PlayerLeashEntityEvent.getLeashHolder()
Returns the entity that is holding the leash.EntityMountEvent.getMount()
Gets the entity which will be ridden.EntityShootBowEvent.getProjectile()
Gets the projectile which will be launched by this eventEntityKnockbackByEntityEvent.getSourceEntity()
Get the entity that has caused knockback to the defender.EntityTargetEvent.getTarget()
Get the entity that this is targeting.PigZombieAngerEvent.getTarget()
Gets the entity (if any) which triggered this anger update.EntityTransformEvent.getTransformedEntity()
获取原实体将转变成的实体.修饰符和类型方法说明void
EntityShootBowEvent.setProjectile
(@NotNull Entity projectile) Replaces the projectile which will be launchedvoid
Set the entity that you want the mob to target instead.void
Set the Entity that you want the mob to target.限定符构造器说明EntityAirChangeEvent
(@NotNull Entity what, int amount) EntityCombustByBlockEvent
(@Nullable Block combuster, @NotNull Entity combustee, float duration) EntityCombustByBlockEvent
(@Nullable Block combuster, @NotNull Entity combustee, int duration) 已过时。EntityCombustByEntityEvent
(@NotNull Entity combuster, @NotNull Entity combustee, float duration) EntityCombustByEntityEvent
(@NotNull Entity combuster, @NotNull Entity combustee, int duration) 已过时。EntityCombustEvent
(@NotNull Entity combustee, float duration) EntityCombustEvent
(@NotNull Entity combustee, int duration) 已过时。EntityDamageByBlockEvent
(@Nullable Block damager, @NotNull Entity damagee, @NotNull EntityDamageEvent.DamageCause cause, double damage) 已过时, 待删除: 此 API 元素将从以后的版本中删除。EntityDamageByBlockEvent
(@Nullable Block damager, @NotNull Entity damagee, @NotNull EntityDamageEvent.DamageCause cause, @NotNull Map<EntityDamageEvent.DamageModifier, Double> modifiers, @NotNull Map<EntityDamageEvent.DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions) 已过时, 待删除: 此 API 元素将从以后的版本中删除。EntityDamageByBlockEvent
(@Nullable Block damager, @Nullable BlockState damagerState, @NotNull Entity damagee, @NotNull EntityDamageEvent.DamageCause cause, @NotNull DamageSource damageSource, double damage) EntityDamageByBlockEvent
(@Nullable Block damager, @Nullable BlockState damagerState, @NotNull Entity damagee, @NotNull EntityDamageEvent.DamageCause cause, @NotNull DamageSource damageSource, @NotNull Map<EntityDamageEvent.DamageModifier, Double> modifiers, @NotNull Map<EntityDamageEvent.DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions) EntityDamageByEntityEvent
(@NotNull Entity damager, @NotNull Entity damagee, @NotNull EntityDamageEvent.DamageCause cause, double damage) 已过时, 待删除: 此 API 元素将从以后的版本中删除。EntityDamageByEntityEvent
(@NotNull Entity damager, @NotNull Entity damagee, @NotNull EntityDamageEvent.DamageCause cause, @NotNull Map<EntityDamageEvent.DamageModifier, Double> modifiers, @NotNull Map<EntityDamageEvent.DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions) 已过时, 待删除: 此 API 元素将从以后的版本中删除。EntityDamageByEntityEvent
(@NotNull Entity damager, @NotNull Entity damagee, @NotNull EntityDamageEvent.DamageCause cause, @NotNull DamageSource damageSource, double damage) EntityDamageByEntityEvent
(@NotNull Entity damager, @NotNull Entity damagee, @NotNull EntityDamageEvent.DamageCause cause, @NotNull DamageSource damageSource, @NotNull Map<EntityDamageEvent.DamageModifier, Double> modifiers, @NotNull Map<EntityDamageEvent.DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions) EntityDamageEvent
(@NotNull Entity damagee, @NotNull EntityDamageEvent.DamageCause cause, double damage) 已过时, 待删除: 此 API 元素将从以后的版本中删除。EntityDamageEvent
(@NotNull Entity damagee, @NotNull EntityDamageEvent.DamageCause cause, @NotNull Map<EntityDamageEvent.DamageModifier, Double> modifiers, @NotNull Map<EntityDamageEvent.DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions) 已过时, 待删除: 此 API 元素将从以后的版本中删除。EntityDamageEvent
(@NotNull Entity damagee, @NotNull EntityDamageEvent.DamageCause cause, @NotNull DamageSource damageSource, double damage) EntityDamageEvent
(@NotNull Entity damagee, @NotNull EntityDamageEvent.DamageCause cause, @NotNull DamageSource damageSource, @NotNull Map<EntityDamageEvent.DamageModifier, Double> modifiers, @NotNull Map<EntityDamageEvent.DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions) EntityDismountEvent
(@NotNull Entity what, @NotNull Entity dismounted) EntityDropItemEvent
(@NotNull Entity entity, @NotNull Item drop) EntityEnterBlockEvent
(@NotNull Entity entity, @NotNull Block block) EntityEvent
(@NotNull Entity what) EntityExplodeEvent
(@NotNull Entity what, @NotNull Location location, @NotNull List<Block> blocks, float yield, @NotNull ExplosionResult result) EntityInteractEvent
(@NotNull Entity entity, @NotNull Block block) EntityKnockbackByEntityEvent
(@NotNull LivingEntity entity, @NotNull Entity source, @NotNull EntityKnockbackEvent.KnockbackCause cause, double force, @NotNull Vector rawKnockback, @NotNull Vector knockback) EntityMountEvent
(@NotNull Entity what, @NotNull Entity mount) EntityPlaceEvent
(@NotNull Entity entity, @Nullable Player player, @NotNull Block block, @NotNull BlockFace blockFace) 已过时。EntityPlaceEvent
(@NotNull Entity entity, @Nullable Player player, @NotNull Block block, @NotNull BlockFace blockFace, @NotNull EquipmentSlot hand) EntityPortalEnterEvent
(@NotNull Entity entity, @NotNull Location location) EntityPortalEvent
(@NotNull Entity entity, @NotNull Location from, @Nullable Location to, int searchRadius) EntityPortalEvent
(@NotNull Entity entity, @NotNull Location from, @Nullable Location to, int searchRadius, boolean canCreatePortal, int creationRadius) EntityPortalExitEvent
(@NotNull Entity entity, @NotNull Location from, @NotNull Location to, @NotNull Vector before, @NotNull Vector after) EntityPoseChangeEvent
(@NotNull Entity who, @NotNull Pose pose) EntityRegainHealthEvent
(@NotNull Entity entity, double amount, @NotNull EntityRegainHealthEvent.RegainReason regainReason) EntityRemoveEvent
(@NotNull Entity what, @NotNull EntityRemoveEvent.Cause cause) EntityShootBowEvent
(@NotNull LivingEntity shooter, @Nullable ItemStack bow, @Nullable ItemStack consumable, @NotNull Entity projectile, @NotNull EquipmentSlot hand, float force, boolean consumeItem) EntitySpawnEvent
(@NotNull Entity spawnee) EntityTargetEvent
(@NotNull Entity entity, @Nullable Entity target, @NotNull EntityTargetEvent.TargetReason reason) EntityTargetLivingEntityEvent
(@NotNull Entity entity, @Nullable LivingEntity target, @Nullable EntityTargetEvent.TargetReason reason) EntityTransformEvent
(@NotNull Entity original, @NotNull List<Entity> convertedList, @NotNull EntityTransformEvent.TransformReason transformReason) EntityUnleashEvent
(@NotNull Entity entity, @NotNull EntityUnleashEvent.UnleashReason reason) ExpBottleEvent
(@NotNull ThrownExpBottle bottle, @Nullable Entity hitEntity, @Nullable Block hitBlock, @Nullable BlockFace hitFace, int exp) ExplosionPrimeEvent
(@NotNull Entity what, float radius, boolean fire) LingeringPotionSplashEvent
(@NotNull ThrownPotion potion, @Nullable Entity hitEntity, @Nullable Block hitBlock, @Nullable BlockFace hitFace, @NotNull AreaEffectCloud entity) PigZombieAngerEvent
(@NotNull PigZombie pigZombie, @Nullable Entity target, int newAnger) 已过时。PlayerLeashEntityEvent
(@NotNull Entity what, @NotNull Entity leashHolder, @NotNull Player leasher, @NotNull EquipmentSlot hand) PotionSplashEvent
(@NotNull ThrownPotion potion, @Nullable Entity hitEntity, @Nullable Block hitBlock, @Nullable BlockFace hitFace, @NotNull Map<LivingEntity, Double> affectedEntities) ProjectileHitEvent
(@NotNull Projectile projectile, @Nullable Entity hitEntity) ProjectileHitEvent
(@NotNull Projectile projectile, @Nullable Entity hitEntity, @Nullable Block hitBlock) ProjectileHitEvent
(@NotNull Projectile projectile, @Nullable Entity hitEntity, @Nullable Block hitBlock, @Nullable BlockFace hitFace) SpawnerSpawnEvent
(@NotNull Entity spawnee, @NotNull CreatureSpawner spawner) TrialSpawnerSpawnEvent
(@NotNull Entity spawnee, @NotNull TrialSpawner spawner) 限定符构造器说明EntityTransformEvent
(@NotNull Entity original, @NotNull List<Entity> convertedList, @NotNull EntityTransformEvent.TransformReason transformReason) -
org.bukkit.event.hanging中Entity的使用
限定符构造器说明HangingBreakByEntityEvent
(@NotNull Hanging hanging, @Nullable Entity remover) HangingBreakByEntityEvent
(@NotNull Hanging hanging, @Nullable Entity remover, HangingBreakEvent.RemoveCause cause) -
org.bukkit.event.player中Entity的使用
修饰符和类型方法说明PlayerFishEvent.getCaught()
Gets the entity caught by the player.PlayerBucketEntityEvent.getEntity()
Gets theEntity
being put into the bucket.PlayerHideEntityEvent.getEntity()
Gets the entity which has been hidden from the player.PlayerShearEntityEvent.getEntity()
获取玩家正在剪切的实体.PlayerShowEntityEvent.getEntity()
Gets the entity which has been shown to the player.PlayerInteractEntityEvent.getRightClicked()
获取被玩家点击的实体.限定符构造器说明PlayerBucketEntityEvent
(@NotNull Player player, @NotNull Entity entity, @NotNull ItemStack originalBucket, @NotNull ItemStack entityBucket, @NotNull EquipmentSlot hand) PlayerFishEvent
(@NotNull Player player, @Nullable Entity entity, @NotNull FishHook hookEntity, @NotNull PlayerFishEvent.State state) PlayerFishEvent
(@NotNull Player player, @Nullable Entity entity, @NotNull FishHook hookEntity, @Nullable EquipmentSlot hand, @NotNull PlayerFishEvent.State state) PlayerHideEntityEvent
(@NotNull Player who, @NotNull Entity entity) PlayerInteractAtEntityEvent
(@NotNull Player who, @NotNull Entity clickedEntity, @NotNull Vector position) PlayerInteractAtEntityEvent
(@NotNull Player who, @NotNull Entity clickedEntity, @NotNull Vector position, @NotNull EquipmentSlot hand) PlayerInteractEntityEvent
(@NotNull Player who, @NotNull Entity clickedEntity) PlayerInteractEntityEvent
(@NotNull Player who, @NotNull Entity clickedEntity, @NotNull EquipmentSlot hand) PlayerShearEntityEvent
(@NotNull Player who, @NotNull Entity what) 已过时。PlayerShearEntityEvent
(@NotNull Player who, @NotNull Entity what, @NotNull ItemStack item, @NotNull EquipmentSlot hand) PlayerShowEntityEvent
(@NotNull Player who, @NotNull Entity entity) PlayerUnleashEntityEvent
(@NotNull Entity entity, @NotNull Player player) 已过时。PlayerUnleashEntityEvent
(@NotNull Entity entity, @NotNull Player player, @NotNull EquipmentSlot hand) -
org.bukkit.event.vehicle中Entity的使用
修饰符和类型方法说明VehicleDamageEvent.getAttacker()
获取攻击这个载具的实体.VehicleDestroyEvent.getAttacker()
获取损毁载具的实体,可能为null.VehicleEnterEvent.getEntered()
获取进入到载具中的实体.VehicleEntityCollisionEvent.getEntity()
限定符构造器说明VehicleDamageEvent
(@NotNull Vehicle vehicle, @Nullable Entity attacker, double damage) VehicleDestroyEvent
(@NotNull Vehicle vehicle, @Nullable Entity attacker) VehicleEnterEvent
(@NotNull Vehicle vehicle, @NotNull Entity entered) VehicleEntityCollisionEvent
(@NotNull Vehicle vehicle, @NotNull Entity entity) -
org.bukkit.event.world中Entity的使用
修饰符和类型方法说明GenericGameEvent.getEntity()
获取触发此事件的实体, 若存在.LootGenerateEvent.getEntity()
获取生成战利品所用的实体 (若适用).PortalCreateEvent.getEntity()
返回导致此传送门创建的实体 (若存在).限定符构造器说明GenericGameEvent
(@NotNull GameEvent event, @NotNull Location location, @Nullable Entity entity, int radius, boolean isAsync) LootGenerateEvent
(@NotNull World world, @Nullable Entity entity, @Nullable InventoryHolder inventoryHolder, @NotNull LootTable lootTable, @NotNull LootContext lootContext, @NotNull List<ItemStack> items, boolean plugin) PortalCreateEvent
(@NotNull List<BlockState> blocks, @NotNull World world, @Nullable Entity entity, @NotNull PortalCreateEvent.CreateReason reason) -
org.bukkit.inventory中Entity的使用
-
org.bukkit.loot中Entity的使用
修饰符和类型方法说明LootContext.Builder.lootedEntity
(@Nullable Entity lootedEntity) The entity that was killed. -
org.bukkit.structure中Entity的使用
修饰符和类型方法说明Structure.getEntities()
Gets a list of entities that have been included in the Structure. -
org.bukkit.util中Entity的使用
修饰符和类型方法说明boolean
EntityTransformer.transform
(@NotNull LimitedRegion region, int x, int y, int z, @NotNull Entity entity, boolean allowedToSpawn) Transforms a entity in a structure.
FishHook