接口的使用
org.bukkit.entity.Entity
使用Entity的程序包
程序包
说明
Bukkit API的顶级程序包, 包含通用的API类和接口.
用于操作在
世界内的三位像素(方块),包括一些特定的状态.Classes concerning damage types and sources applicable to living entities.
为在
世界内存在的非三维像素单位(实体)提供的接口,包含玩家、怪物、抛射物等.Interfaces for various
Boat types.为不同种类的
矿车提供的接口.参与操作玩家物品栏和物品交互的类.
与战利品表产生与操作有关的类 (Minecraft Wiki - 战利品表).
Classes related to creating or using
structures without creating Structure
blocks in the world.提供多种目的和单一目的的类以简化各种编程概念.
-
org.bukkit中Entity的使用
类型参数类型为Entity的org.bukkit中的方法修饰符和类型方法说明<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 givenLocationbut 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 givenLocationwith 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.返回Entity的org.bukkit中的方法修饰符和类型方法说明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.返回变量类型为Entity的类型的org.bukkit中的方法修饰符和类型方法说明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.参数类型为Entity的org.bukkit中的方法修饰符和类型方法说明booleanWorld.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.booleanWorld.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.booleanEntityEffect.isApplicableTo(@NotNull Entity entity) Checks if this effect is applicable to the given entity.booleanChecks if a given entity is frozen.voidPlay a Sound at the location of the provided entity in the World.voidWorld.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.voidWorld.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.voidPlay a Sound at the location of the provided entity in the World.voidWorld.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.voidWorld.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.类型变量类型为Entity的org.bukkit中的方法参数修饰符和类型方法说明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.booleanEntityEffect.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) 执行检查实体碰撞的射线跟踪.参数类型为Entity的org.bukkit中的构造器 -
org.bukkit.block中Entity的使用
类型参数类型为Entity的org.bukkit.block中的类返回变量类型为Entity的类型的org.bukkit.block中的方法参数类型为Entity的org.bukkit.block中的方法修饰符和类型方法说明返回当某实体使用某工具破坏此方块时掉落的物品.booleanTrialSpawner.isTrackingEntity(@NotNull Entity entity) 检查此刷怪笼当前是否正在追踪指定的实体.boolean按钟面对的方向敲响此钟.boolean敲响此钟.voidTrialSpawner.startTrackingEntity(@NotNull Entity entity) 强制此刷怪笼开始追踪指定的实体.voidTrialSpawner.stopTrackingEntity(@NotNull Entity entity) 强制此刷怪笼停止追踪指定的实体. -
org.bukkit.damage中Entity的使用
返回Entity的org.bukkit.damage中的方法修饰符和类型方法说明DamageSource.getCausingEntity()Get theEntitythat caused the damage to occur.DamageSource.getDirectEntity()Get theEntitythat directly caused the damage.参数类型为Entity的org.bukkit.damage中的方法修饰符和类型方法说明DamageSource.Builder.withCausingEntity(@NotNull Entity entity) Set theEntitythat caused the damage.DamageSource.Builder.withDirectEntity(@NotNull Entity entity) Set theEntitythat directly inflicted the damage. -
org.bukkit.entity中Entity的使用
修饰符和类型接口说明interface代表一支箭.interfaceRepresents a Cow.interface代表一个马基对象.interfaceThis interface defines or represents the abstract concept of skeleton-like entities on the server.interface代表一个抽象村民NPC.interfaceRepresents a Wind Charge.interface代表一个有年龄的实体.interfaceAn Allay.interface代表环境生物(目前只有蝙蝠属于这一行列).interface代表动物.interface代表一片即将对处于其中的生物施加药水效果的区域效果云 (即喷溅药水使用后形成的雾).interfaceRepresents an Armadillo.interfaceinterface表示一只箭矢.interfaceAn Axolotl.interface表示一只蝙蝠.interface代表蜜蜂.interface代表烈焰人怪物.interfaceRepresents a block display entity.interface代表船实体interfaceRepresents a Bogged Skeleton.interface代表一个Boss实体.interface代表一个有年龄和繁殖能力的实体.interfaceRepresents a Breeze.interfaceRepresents a Wind Charge.interface代表一只骆驼interface喵.interface代表蜘蛛(洞穴蜘蛛).interfaceABoatwith a chest.interface代表一个可以携带物品的类马生物.interface代表鸡.interface代表鳕鱼.interface代表ComplexLivingEntity的一部分.interface代表复杂生物 --- 由多种较小实体部分组成 (目前只有末影龙属于此行列).interface代表牛.interfaceRepresents a Creaking.interface代表一类生物.interface代表苦力怕.interface表示一个有生命值和可以被伤害的实体(Entity)。interfaceRepresents 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代表抛出的末影之眼.interfaceRepresents an Enemyinterface代表唤魔者.interface代表唤魔者召唤的尖牙.interface代表一个经验球.interface代表可爆炸的实体.interface代表一个下落方块.interface代表一个火球.interface烟花火箭实体.interface已过时。interface代表一个鱼钩.interface代表能飞行的实体.interface代表狐狸.interfaceA Frog.interface代表恶魂.interface代表巨人.interfaceA Glow Item Frame.interfaceA Glow Squid.interfaceA Goat.interface一个可以伤害敌人的傀儡.interface守卫海底遗迹的守卫者们.interface代表悬挂实体.interfaceRepresents a Happy Ghast.interfaceRepresents a Hoglin.interface代表一匹马.interface代表人类实体, 比如一个NPC或一名玩家interface代表一具尸壳 -Zombie的变异体.interface代表一种"灾厄村民" (亦称刌民), 包含卫道士、女巫等.interface代表幻术师实体.interfaceRepresents an entity designed to only record interactions.interface村民守卫者——铁傀儡.interface代表掉落物实体.interfaceRepresents an item display entity.interface代表物品展示框.interface代表大的火球(Fireball).interface跟随主人, 那是因为我被设定成这样啊~ (代表系在栅栏上的拴绳).interface代表雷击的实例,可能会或者不会造成伤害。interface代表抛出的滞留药水.interface代表一个生物实体,比如一只怪物或一名玩家.interface表示一只羊驼.interface代表羊驼唾沫.interface代表岩浆怪.interfaceA Marker entity, exists only on the server.interface代表矿车实体.interfaceRepresents a Mob.interface代表怪物.interface代表骡子 -ChestedHorse的变种.interface代表哞菇(AbstractCow).interface代表非玩家角色.interface代表豹猫.interfaceRepresents an ominous item spawner.interface代表画.interface代表熊猫.interface代表鹦鹉.interface代表幻翼.interface代表猪.interfaceRepresents a Piglin.interfacePiglin / Piglin Brute.interfaceRepresents a Piglin Brute.interface代表僵尸猪人.interface掠夺者实体.interface玩家对象interface代表北极熊.interface表示可被射击实体的概念interfaceRepresents a puffer fish.interfaceinterfaceinterface劫掠兽实体.interfaceRepresents a salmon fish.interface代表羊.interfaceinterfaceinterface代表蠹虫.interfaceRepresents a sized fireball.interface代表骷髅.interfaceRepresents a SkeletonHorse - variant ofAbstractHorse.interface代表史莱姆.interface代表小的火球(Fireball).interfaceRepresents a Sniffer.interface代表雪球.interface代表雪人实体.interfaceRepresents a spectral arrow.interface代表会施法的灾厄村民 (目前只有唤魔者和幻术师).interface代表蜘蛛.interfaceRepresents a thrown splash potion bottleinterface代表鱿鱼.interfaceRepresents an entity which may be saddled, ridden and steered using an item.interfaceRepresents a Stray - variant ofAbstractSkeleton.interfaceRepresents a Strider.interfaceA babyFrog.interfaceinterfaceRepresents a text display entity.interfaceinterface代表抛出的附魔之瓶.interface代表一个被抛出的药水瓶.interface已过时。tipped status depends only on base potion type not being UNCRAFTABLE and effects being empty.interfaceRepresents a Primed TNT.interfaceRepresents a trader Llama.interface代表被抛出的三叉戟.interface代表热带鱼.interfaceRepresents a turtle.interfaceRepresents a vehicle entity.interface恼鬼.interfaceRepresents a villager NPCinterface代表卫道士.interfaceRepresents a wandering trader NPCinterface监守者.interface代表海洋生物.interfaceRepresents a Wind Charge.interface代表女巫.interface代表凋零boss.interfaceRepresents a WitherSkeleton - variant ofAbstractSkeleton.interface代表凋零之首.interface代表狼.interfaceRepresents a Zoglin.interface代表僵尸.interfaceRepresents a ZombieHorse - variant ofAbstractHorse.interface返回Entity的org.bukkit.entity中的方法修饰符和类型方法说明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.返回变量类型为Entity的类型的org.bukkit.entity中的方法修饰符和类型方法说明EntityType.getEntityClass()Entity.getNearbyEntities(double x, double y, double z) 返回以此实体为中心的边界框内的所有实体.Entity.getPassengers()获取载具的乘客列表.参数类型为Entity的org.bukkit.entity中的方法修饰符和类型方法说明booleanEntity.addPassenger(@NotNull Entity passenger) 添加一名乘客.void让此实体对指定实体进行近战攻击。booleanChecks to see if an entity has been visually hidden from this player.voidWarden.clearAnger(@NotNull Entity entity) Clears the anger level of this warden.void强制某实体伤害这个实体.intGets the anger level of this warden.booleanLivingEntity.hasLineOfSight(@NotNull Entity other) 检查生物实体是否阻挡另一个的视线.voidPlayer.hideEntity(@NotNull Plugin plugin, @NotNull Entity entity) 从视觉上隐藏一个实体.void点燃此苦力怕, 开始其爆炸计时.voidWarden.increaseAnger(@NotNull Entity entity, int increase) Increases the anger level of this warden.voidPlay a sound for a player at the location of the entity.voidPlayer.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.voidPlayer.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.voidPlay a sound for a player at the location of the entity.voidPlayer.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.voidPlayer.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.booleanEntity.removePassenger(@NotNull Entity passenger) 移除一名乘客.voidPlayer.sendBlockDamage(@NotNull Location loc, float progress, @NotNull Entity source) Send block damage.voidSets the anger level of this warden.voidFishHook.setHookedEntity(@Nullable Entity entity) Set the entity hooked by this fish hook.booleanLivingEntity.setLeashHolder(@Nullable Entity holder) 设置握持拴绳的实体.booleanEntity.setPassenger(@NotNull Entity passenger) 已过时。实体可能有多名乘客.voidHumanEntity.setShoulderEntityLeft(@Nullable Entity entity) 已过时。Bukkit中目前还没有关于序列化实体的语义(格式)的良好定义.voidHumanEntity.setShoulderEntityRight(@Nullable Entity entity) 已过时。Bukkit中目前还没有关于序列化实体的语义(格式)的良好定义.voidSets the source of this primed TNT.voidPlayer.setSpectatorTarget(@Nullable Entity entity) 设置模式下镜头跟随的实体.voidSets the target of this bulletvoidFrog.setTongueTarget(@Nullable Entity target) Sets the tongue target of this frog.voidPlayer.showEntity(@NotNull Plugin plugin, @NotNull Entity entity) Allows this player to see an entity that was previously hidden.boolean将此实体传送到目标实体.booleanEntity.teleport(@NotNull Entity destination, @NotNull PlayerTeleportEvent.TeleportCause cause) 将此实体传送到目标实体.booleanEnderman.teleportTowards(@NotNull Entity entity) Randomly teleports the Enderman towards the givenentity. -
org.bukkit.entity.boat中Entity的使用
修饰符和类型接口说明interfaceRepresents an acacia boat.interfaceRepresents an acacia chest boat.interfaceRepresents a bamboo chest raft.interfaceRepresents a bamboo raft.interfaceRepresents a birch boat.interfaceRepresents a birch chest boat.interfaceRepresents a cherry boat.interfaceRepresents a cherry chest boat.interfaceRepresents a dark oak boat.interfaceRepresents a dark oak chest boat.interfaceRepresents a jungle boat.interfaceRepresents a jungle chest boat.interfaceRepresents a mangrove boat.interfaceRepresents a mangrove chest boat.interfaceRepresents an oak boat.interfaceRepresents an oak chest boat.interfaceRepresents an pale oak boat.interfaceRepresents an pale oak chest boat.interfaceRepresents a spruce boat.interfaceRepresents a spruce chest boat. -
org.bukkit.entity.minecart中Entity的使用
修饰符和类型接口说明interface代表命令方块矿车.interface代表TNT矿车,可以被引爆.interface代表漏斗矿车.interface代表动力矿车.当玩家往动力矿车里放燃料后它就会自己移动.interface代表可乘坐的矿车.interface代表有刷怪箱在里面的矿车(即刷怪箱矿车).interface代表运输矿车,你可以使用InventoryHolder里的方法来访问. -
org.bukkit.event.block中Entity的使用
返回Entity的org.bukkit.event.block中的方法修饰符和类型方法说明BellRingEvent.getEntity()Get theEntitythat 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.参数类型为Entity的org.bukkit.event.block中的构造器限定符构造器说明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的使用
声明为Entity的org.bukkit.event.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.VillagerReputationChangeEvent.getTarget()Get the Entity for whom the reputation with a villager changes.EntityTransformEvent.getTransformedEntity()获取原实体将转变成的实体.返回变量类型为Entity的类型的org.bukkit.event.entity中的方法参数类型为Entity的org.bukkit.event.entity中的方法修饰符和类型方法说明voidEntityShootBowEvent.setProjectile(@NotNull Entity projectile) Replaces the projectile which will be launchedvoidSet the entity that you want the mob to target instead.voidSet the Entity that you want the mob to target.参数类型为Entity的org.bukkit.event.entity中的构造器限定符构造器说明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) 类型变量类型为Entity的org.bukkit.event.entity中的构造器参数限定符构造器说明EntityTransformEvent(@NotNull Entity original, @NotNull List<Entity> convertedList, @NotNull EntityTransformEvent.TransformReason transformReason) -
org.bukkit.event.hanging中Entity的使用
参数类型为Entity的org.bukkit.event.hanging中的构造器限定符构造器说明HangingBreakByEntityEvent(@NotNull Hanging hanging, @Nullable Entity remover) HangingBreakByEntityEvent(@NotNull Hanging hanging, @Nullable Entity remover, HangingBreakEvent.RemoveCause cause) -
org.bukkit.event.player中Entity的使用
声明为Entity的org.bukkit.event.player中的字段修饰符和类型方法说明PlayerFishEvent.getCaught()Gets the entity caught by the player.PlayerBucketEntityEvent.getEntity()Gets theEntitybeing 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()获取被玩家点击的实体.参数类型为Entity的org.bukkit.event.player中的构造器限定符构造器说明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()参数类型为Entity的org.bukkit.event.vehicle中的构造器限定符构造器说明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的使用
返回Entity的org.bukkit.event.world中的方法修饰符和类型方法说明GenericGameEvent.getEntity()获取触发此事件的实体, 若存在.LootGenerateEvent.getEntity()获取生成战利品所用的实体 (若适用).PortalCreateEvent.getEntity()返回导致此传送门创建的实体 (若存在).返回变量类型为Entity的类型的org.bukkit.event.world中的方法参数类型为Entity的org.bukkit.event.world中的构造器限定符构造器说明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) 类型变量类型为Entity的org.bukkit.event.world中的构造器参数 -
org.bukkit.inventory中Entity的使用
返回Entity的org.bukkit.inventory中的方法参数类型为Entity的org.bukkit.inventory中的方法 -
org.bukkit.loot中Entity的使用
返回Entity的org.bukkit.loot中的方法参数类型为Entity的org.bukkit.loot中的方法修饰符和类型方法说明LootContext.Builder.lootedEntity(@Nullable Entity lootedEntity) The entity that was killed. -
org.bukkit.structure中Entity的使用
返回变量类型为Entity的类型的org.bukkit.structure中的方法修饰符和类型方法说明Structure.getEntities()Gets a list of entities that have been included in the Structure. -
org.bukkit.util中Entity的使用
返回Entity的org.bukkit.util中的方法参数类型为Entity的org.bukkit.util中的方法修饰符和类型方法说明booleanEntityTransformer.transform(@NotNull LimitedRegion region, int x, int y, int z, @NotNull Entity entity, boolean allowedToSpawn) Transforms a entity in a structure.参数类型为Entity的org.bukkit.util中的构造器
FishHook