接口的使用
org.bukkit.entity.Entity
-
org.bukkit中Entity的使用
修饰符和类型方法说明<T extends Entity>
Collection<T>World.getEntitiesByClass
(Class<T> cls) 获取一个在这个世界的所有与指定的类/接口相匹配的实体的集合.<T extends Entity>
Collection<T>World.getEntitiesByClass
(Class<T>... classes) 已过时。<T extends Entity>
T在指定的位置
根据给定的类生成一个实体.<T extends Entity>
TSpawn an entity of a specific class at the givenLocation
, with the supplied function run before the entity is added to the world.修饰符和类型方法说明Entity[]
Chunk.getEntities()
获取该区块内所有实体(Entity
)列表数组.static Entity
用UUID获取实体.用UUID获取实体.World.spawnEntity
(Location loc, EntityType type) 在指定的位置
创建一个实体.修饰符和类型方法说明EntityEffect.getApplicable()
获取该效果能应用到的实体超类.World.getEntities()
获取一个这个世界所有实体的列表.World.getEntitiesByClasses
(Class<?>... classes) 获取一个在这个世界的所有与任一指定的类/接口相匹配的实体的集合.World.getNearbyEntities
(Location location, double x, double y, double z) 返回一个以这个位置为中心的包围着的所有实体的列表(译注:这个可能不太好理解,就是在这个位置,按指定的搜索范围,搜索这个范围里的所有实体). -
org.bukkit.entity中Entity的使用
修饰符和类型接口说明interface
Represents a Horse-like creature.interface
代表一个有年龄和繁殖能力的实体.interface
代表环境生物(只有蝙蝠属于这一行列).interface
代表动物.interface
代表一片即将对处于其中的生物施加药水效果的区域效果云 (即喷溅药水使用后形成的雾).interface
interface
表示一只箭矢.interface
表示一只蝙蝠.interface
代表烈焰人怪物.interface
代表船实体interface
代表蜘蛛(洞穴蜘蛛).interface
Represents Horse-like creatures which can carry an inventory.interface
代表鸡.interface
Represents a single part of aComplexLivingEntity
interface
Represents a complex living entity - one that is made up of various smaller partsinterface
代表牛.interface
Represents a Creature.interface
代表爬行者.interface
表示一个有生命值和可以被伤害的实体(Entity
)。interface
Represents a Donkey - variant ofChestedHorse
.interface
interface
代表抛出的鸡蛋.interface
Represents an ElderGuardian - variant ofGuardian
.interface
一个水晶,能治疗附近的末影龙interface
Represents an Ender Dragoninterface
代表末影龙部分/Represents an ender dragon partinterface
代表末影人.interface
interface
代表抛出的末影珍珠实体.interface
Represents an EnderSignal, which is created upon throwing an ender eye.interface
Represents an Evoker "Illager".interface
Represents Evoker Fangs.interface
Represents an Experience Orb.interface
A representation of an explosive entityinterface
Represents a falling blockinterface
Represents a Fireball.interface
interface
已过时。interface
Represents a fishing hook.interface
代表能飞行的实体.interface
代表恶魂.interface
代表巨人.interface
一个可以伤害敌人的傀儡.interface
interface
代表悬挂实体.interface
代表一匹马.interface
代表人类实体, 比如一个NPC或一名玩家interface
代表一具尸壳 -Zombie
的变异体.interface
Represents a type of "Illager".interface
Represents an Illusioner "Illager".interface
村民守卫者——铁傀儡.interface
Represents an Item.interface
代表物品展示框.interface
代表大的火球(Fireball
).interface
Represents a Leash Hitch on a fenceinterface
代表雷击的实例,可能会或者不会造成伤害。interface
Represents a thrown lingering potion bottleinterface
代表一个生物实体,如一只怪物或一名玩家。interface
表示一只羊驼.interface
代表羊驼唾沫.interface
Represents a MagmaCube.interface
Represents a minecart entity.interface
代表怪物.interface
Represents a Mule - variant ofChestedHorse
.interface
代表哞菇(Cow
).interface
代表非玩家角色.interface
代表豹猫.interface
代表画.interface
Represents a Parrot.interface
代表猪.interface
代表僵尸猪人.interface
玩家对象interface
Represents a polar bear.interface
Represents a shootable entity.interface
interface
代表羊.interface
interface
interface
代表蠢虫.interface
代表骷髅.interface
Represents a SkeletonHorse - variant ofAbstractHorse
.interface
代表史莱姆.interface
代表小的火球(Fireball
).interface
代表雪球.interface
代表雪人实体.interface
Represents a spectral arrow.interface
Represents a spell casting "Illager".interface
代表蜘蛛.interface
Represents a thrown splash potion bottleinterface
代表鱿鱼.interface
Represents a Stray - variant ofSkeleton
.interface
interface
代表抛出的附魔之瓶.interface
Represents a thrown potion bottleinterface
interface
Represents a Primed TNT.interface
Represents a vehicle entity.interface
Represents a Vex.interface
Represents a villager NPCinterface
Represents a Vindicator.interface
代表海洋生物.interface
代表与天气有关的实体,例如雷暴.interface
代表女巫.interface
代表凋零boss.interface
Represents a WitherSkeleton - variant ofSkeleton
.interface
代表凋零之首.interface
代表狼.interface
代表僵尸.interface
Represents a ZombieHorse - variant ofAbstractHorse
.interface
修饰符和类型方法说明LivingEntity.getLeashHolder()
获取当前牵引此实体的实体。Entity.getPassenger()
已过时。entities may have multiple passengers, usegetPassengers()
HumanEntity.getShoulderEntityLeft()
已过时。Bukkit中目前还没有关于序列化实体的语义(格式)的良好定义.HumanEntity.getShoulderEntityRight()
已过时。Bukkit中目前还没有关于序列化实体的语义(格式)的良好定义.TNTPrimed.getSource()
Gets the source of this primed TNT.Player.getSpectatorTarget()
Gets the entity which is followed by the camera when inGameMode.SPECTATOR
.ShulkerBullet.getTarget()
Retrieve the target of this bullet.Entity.getVehicle()
Get the vehicle that this player is inside.修饰符和类型方法说明EntityType.getEntityClass()
Entity.getNearbyEntities
(double x, double y, double z) Returns a list of entities within a bounding box centered around this entityEntity.getPassengers()
Gets a list of passengers of this vehicle.修饰符和类型方法说明boolean
Entity.addPassenger
(Entity passenger) Add a passenger to the vehicle.void
强制某实体伤害这个实体。boolean
LivingEntity.hasLineOfSight
(Entity other) 检查生物实体是否阻挡另一个的视线。boolean
Entity.removePassenger
(Entity passenger) Remove a passenger from the vehicle.boolean
LivingEntity.setLeashHolder
(Entity holder) 设置握持拴绳的实体。boolean
Entity.setPassenger
(Entity passenger) 已过时。entities may have multiple passengers, usegetPassengers()
void
HumanEntity.setShoulderEntityLeft
(Entity entity) 已过时。Bukkit中目前还没有关于序列化实体的语义(格式)的良好定义.void
HumanEntity.setShoulderEntityRight
(Entity entity) 已过时。Bukkit中目前还没有关于序列化实体的语义(格式)的良好定义.void
Player.setSpectatorTarget
(Entity entity) Sets the entity which is followed by the camera when inGameMode.SPECTATOR
.void
Sets the target of this bulletboolean
Teleports this entity to the target Entity.boolean
Entity.teleport
(Entity destination, PlayerTeleportEvent.TeleportCause cause) Teleports this entity to the target Entity. -
org.bukkit.entity.minecart中Entity的使用
修饰符和类型接口说明interface
代表命令方块矿车.interface
代表TNT矿车,可以被引爆.interface
代表漏斗矿车.interface
代表动力矿车.当玩家往动力矿车里放燃料
后它就会自己移动.interface
代表可乘坐的矿车.interface
代表有刷怪箱
在里面的矿车(即刷怪箱矿车).interface
代表运输矿车,你可以使用InventoryHolder
里的方法来访问. -
org.bukkit.event.block中Entity的使用
修饰符和类型方法说明CauldronLevelChangeEvent.getEntity()
获取哪个实体触发该事件,值有可能为Null.EntityBlockFormEvent.getEntity()
获取被建造的实体.BlockIgniteEvent.getIgnitingEntity()
获取点燃方块的实体.限定符构造器说明BlockIgniteEvent
(Block theBlock, BlockIgniteEvent.IgniteCause cause, Entity ignitingEntity) BlockIgniteEvent
(Block theBlock, BlockIgniteEvent.IgniteCause cause, Entity ignitingEntity, Block ignitingBlock) CauldronLevelChangeEvent
(Block block, Entity entity, CauldronLevelChangeEvent.ChangeReason reason, int oldLevel, int newLevel) EntityBlockFormEvent
(Entity entity, Block block, BlockState blockstate) -
org.bukkit.event.entity中Entity的使用
修饰符和类型方法说明EntityCombustByEntityEvent.getCombuster()
返回造成燃烧的实体.EntityDamageByEntityEvent.getDamager()
返回造成这次伤害的实体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.EntityShootBowEvent.getProjectile()
Gets the projectile which will be launched by this eventEntityTargetEvent.getTarget()
Get the entity that this is targeting.修饰符和类型方法说明void
EntityShootBowEvent.setProjectile
(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
(Entity what, int amount) EntityChangeBlockEvent
(Entity what, Block block, Material to, byte data) 已过时。不安全的参数EntityCombustByBlockEvent
(Block combuster, Entity combustee, int duration) EntityCombustByEntityEvent
(Entity combuster, Entity combustee, int duration) EntityCombustEvent
(Entity combustee, int duration) EntityDamageByBlockEvent
(Block damager, Entity damagee, EntityDamageEvent.DamageCause cause, double damage) 已过时。EntityDamageByBlockEvent
(Block damager, Entity damagee, EntityDamageEvent.DamageCause cause, Map<EntityDamageEvent.DamageModifier, Double> modifiers, Map<EntityDamageEvent.DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions) EntityDamageByEntityEvent
(Entity damager, Entity damagee, EntityDamageEvent.DamageCause cause, double damage) 已过时。EntityDamageByEntityEvent
(Entity damager, Entity damagee, EntityDamageEvent.DamageCause cause, Map<EntityDamageEvent.DamageModifier, Double> modifiers, Map<EntityDamageEvent.DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions) EntityDamageEvent
(Entity damagee, EntityDamageEvent.DamageCause cause, double damage) 已过时。EntityDamageEvent
(Entity damagee, EntityDamageEvent.DamageCause cause, Map<EntityDamageEvent.DamageModifier, Double> modifiers, Map<EntityDamageEvent.DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions) EntityEvent
(Entity what) EntityExplodeEvent
(Entity what, Location location, List<Block> blocks, float yield) EntityInteractEvent
(Entity entity, Block block) EntityPortalEnterEvent
(Entity entity, Location location) EntityPortalEvent
(Entity entity, Location from, Location to, TravelAgent pta) EntityRegainHealthEvent
(Entity entity, double amount, EntityRegainHealthEvent.RegainReason regainReason) EntityTargetEvent
(Entity entity, Entity target, EntityTargetEvent.TargetReason reason) EntityTargetLivingEntityEvent
(Entity entity, LivingEntity target, EntityTargetEvent.TargetReason reason) EntityTeleportEvent
(Entity what, Location from, Location to) EntityUnleashEvent
(Entity entity, EntityUnleashEvent.UnleashReason reason) ExplosionPrimeEvent
(Entity what, float radius, boolean fire) PlayerLeashEntityEvent
(Entity what, Entity leashHolder, Player leasher) ProjectileHitEvent
(Projectile projectile, Entity hitEntity) ProjectileHitEvent
(Projectile projectile, Entity hitEntity, Block hitBlock) ProjectileLaunchEvent
(Entity what) -
org.bukkit.event.hanging中Entity的使用
限定符构造器说明HangingBreakByEntityEvent
(Hanging hanging, Entity remover) HangingBreakByEntityEvent
(Hanging hanging, Entity remover, HangingBreakEvent.RemoveCause cause) -
org.bukkit.event.player中Entity的使用
修饰符和类型方法说明PlayerFishEvent.getCaught()
Gets the entity caught by the player.PlayerShearEntityEvent.getEntity()
获得正在被玩家剪羊毛的实体对象.PlayerInteractEntityEvent.getRightClicked()
获取被玩家点击的实体.限定符构造器说明PlayerFishEvent
(Player player, Entity entity, Fish 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) PlayerUnleashEntityEvent
(Entity entity, Player player) -
org.bukkit.event.vehicle中Entity的使用
修饰符和类型方法说明VehicleDamageEvent.getAttacker()
获取攻击这个载具的实体.VehicleDestroyEvent.getAttacker()
获取损毁载具的实体,可能为null.VehicleEnterEvent.getEntered()
获取进入到载具中的实体.VehicleEntityCollisionEvent.getEntity()
限定符构造器说明VehicleDamageEvent
(Vehicle vehicle, Entity attacker, double damage) VehicleDestroyEvent
(Vehicle vehicle, Entity attacker) VehicleEnterEvent
(Vehicle vehicle, Entity entered) VehicleEntityCollisionEvent
(Vehicle vehicle, Entity entity) -
org.bukkit.inventory中Entity的使用
FishHook