程序包 | 说明 |
---|---|
org.bukkit |
Bukkit的常用类.
|
org.bukkit.entity |
为在
世界 内存在的非三维像素单位(实体)提供的接口,包含玩家、怪物、抛射物等. |
org.bukkit.entity.minecart |
为不同种类的
矿车 提供的接口. |
org.bukkit.event.block | |
org.bukkit.event.entity | |
org.bukkit.event.hanging | |
org.bukkit.event.player | |
org.bukkit.event.vehicle | |
org.bukkit.inventory |
参与操作玩家物品栏和物品交互的类.
|
限定符和类型 | 方法和说明 |
---|---|
<T extends Entity> |
World.getEntitiesByClass(java.lang.Class<T>... classes)
已过时。
|
<T extends Entity> |
World.getEntitiesByClass(java.lang.Class<T> cls)
获取一个在这个世界的所有与指定的类/接口相匹配的实体的集合.
|
<T extends Entity> |
World.spawn(Location location,
java.lang.Class<T> clazz)
在指定的
位置 根据给定的类生成一个实体. |
<T extends Entity> |
World.spawn(Location location,
java.lang.Class<T> clazz,
Consumer<T> function)
Spawn an entity of a specific class at the given
Location , with
the supplied function run before the entity is added to the world. |
限定符和类型 | 方法和说明 |
---|---|
Entity[] |
Chunk.getEntities()
获取该区块内所有实体(
Entity )列表数组. |
static Entity |
Bukkit.getEntity(java.util.UUID uuid)
用UUID获取实体.
|
Entity |
Server.getEntity(java.util.UUID uuid)
用UUID获取实体.
|
Entity |
World.spawnEntity(Location loc,
EntityType type)
在指定的
位置 创建一个实体. |
限定符和类型 | 方法和说明 |
---|---|
java.lang.Class<? extends Entity> |
EntityEffect.getApplicable()
获取该效果能应用到的实体超类.
|
java.util.List<Entity> |
World.getEntities()
获取一个这个世界所有实体的列表.
|
java.util.Collection<Entity> |
World.getEntitiesByClasses(java.lang.Class<?>... classes)
获取一个在这个世界的所有与任一指定的类/接口相匹配的实体的集合.
|
java.util.Collection<Entity> |
World.getNearbyEntities(Location location,
double x,
double y,
double z)
返回一个以这个位置为中心的包围着的所有实体的列表(译注:这个可能不太好理解,就是在这个位置,按指定的搜索范围,搜索这个范围里的所有实体).
|
限定符和类型 | 接口和说明 |
---|---|
interface |
AbstractHorse
Represents a Horse-like creature.
|
interface |
Ageable
代表一个有年龄和繁殖能力的实体.
|
interface |
Ambient
代表环境生物(只有蝙蝠属于这一行列).
|
interface |
Animals
代表动物.
|
interface |
AreaEffectCloud
代表一片即将对处于其中的生物施加药水效果的区域效果云 (即喷溅药水使用后形成的雾).
|
interface |
ArmorStand |
interface |
Arrow
表示一只箭矢.
|
interface |
Bat
表示一只蝙蝠.
|
interface |
Blaze
代表烈焰人怪物.
|
interface |
Boat
代表船实体
|
interface |
CaveSpider
代表蜘蛛(洞穴蜘蛛).
|
interface |
ChestedHorse
Represents Horse-like creatures which can carry an inventory.
|
interface |
Chicken
代表鸡.
|
interface |
ComplexEntityPart
Represents a single part of a
ComplexLivingEntity |
interface |
ComplexLivingEntity
Represents a complex living entity - one that is made up of various smaller
parts
|
interface |
Cow
代表牛.
|
interface |
Creature
Represents a Creature.
|
interface |
Creeper
代表爬行者.
|
interface |
Damageable
表示一个有生命值和可以被伤害的实体(
Entity )。 |
interface |
Donkey
Represents a Donkey - variant of
ChestedHorse . |
interface |
DragonFireball |
interface |
Egg
代表抛出的鸡蛋.
|
interface |
ElderGuardian
Represents an ElderGuardian - variant of
Guardian . |
interface |
EnderCrystal
一个水晶,能治疗附近的末影龙
|
interface |
EnderDragon
Represents an Ender Dragon
|
interface |
EnderDragonPart
代表末影龙部分/Represents an ender dragon part
|
interface |
Enderman
代表末影人.
|
interface |
Endermite |
interface |
EnderPearl
代表抛出的末影珍珠实体.
|
interface |
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 entity
|
interface |
FallingBlock
Represents a falling block
|
interface |
Fireball
Represents a Fireball.
|
interface |
Firework |
interface |
Fish
已过时。
赞成使用
FishHook |
interface |
FishHook
Represents a fishing hook.
|
interface |
Flying
代表能飞行的实体.
|
interface |
Ghast
代表恶魂.
|
interface |
Giant
代表巨人.
|
interface |
Golem
一个可以伤害敌人的傀儡.
|
interface |
Guardian |
interface |
Hanging
代表悬挂实体.
|
interface |
Horse
代表一匹马.
|
interface |
HumanEntity
代表人类实体, 比如一个NPC或一名玩家
|
interface |
Husk
代表一具尸壳 -
Zombie 的变异体. |
interface |
Illager
Represents a type of "Illager".
|
interface |
Illusioner
Represents an Illusioner "Illager".
|
interface |
IronGolem
村民守卫者——铁傀儡.
|
interface |
Item
Represents an Item.
|
interface |
ItemFrame
代表物品展示框.
|
interface |
LargeFireball
代表大的火球(
Fireball ). |
interface |
LeashHitch
Represents a Leash Hitch on a fence
|
interface |
LightningStrike
代表雷击的实例,可能会或者不会造成伤害。
|
interface |
LingeringPotion
Represents a thrown lingering potion bottle
|
interface |
LivingEntity
代表一个生物实体,如一只怪物或一名玩家。
|
interface |
Llama
表示一只羊驼.
|
interface |
LlamaSpit
代表羊驼唾沫.
|
interface |
MagmaCube
Represents a MagmaCube.
|
interface |
Minecart
Represents a minecart entity.
|
interface |
Monster
代表怪物.
|
interface |
Mule
Represents a Mule - variant of
ChestedHorse . |
interface |
MushroomCow
代表哞菇(
Cow ). |
interface |
NPC
代表非玩家角色.
|
interface |
Ocelot
代表豹猫.
|
interface |
Painting
代表画.
|
interface |
Parrot
Represents a Parrot.
|
interface |
Pig
代表猪.
|
interface |
PigZombie
代表僵尸猪人.
|
interface |
Player
玩家对象
|
interface |
PolarBear
Represents a polar bear.
|
interface |
Projectile
Represents a shootable entity.
|
interface |
Rabbit |
interface |
Sheep
代表羊.
|
interface |
Shulker |
interface |
ShulkerBullet |
interface |
Silverfish
代表蠢虫.
|
interface |
Skeleton
代表骷髅.
|
interface |
SkeletonHorse
Represents a SkeletonHorse - variant of
AbstractHorse . |
interface |
Slime
代表史莱姆.
|
interface |
SmallFireball
代表小的火球(
Fireball ). |
interface |
Snowball
代表雪球.
|
interface |
Snowman
代表雪人实体.
|
interface |
SpectralArrow
Represents a spectral arrow.
|
interface |
Spellcaster
Represents a spell casting "Illager".
|
interface |
Spider
代表蜘蛛.
|
interface |
SplashPotion
Represents a thrown splash potion bottle
|
interface |
Squid
代表鱿鱼.
|
interface |
Stray
Represents a Stray - variant of
Skeleton . |
interface |
Tameable |
interface |
ThrownExpBottle
代表抛出的附魔之瓶.
|
interface |
ThrownPotion
Represents a thrown potion bottle
|
interface |
TippedArrow |
interface |
TNTPrimed
Represents a Primed TNT.
|
interface |
Vehicle
Represents a vehicle entity.
|
interface |
Vex
Represents a Vex.
|
interface |
Villager
Represents a villager NPC
|
interface |
Vindicator
Represents a Vindicator.
|
interface |
WaterMob
代表海洋生物.
|
interface |
Weather
代表与天气有关的实体,例如雷暴.
|
interface |
Witch
代表女巫.
|
interface |
Wither
代表凋零boss.
|
interface |
WitherSkeleton
Represents a WitherSkeleton - variant of
Skeleton . |
interface |
WitherSkull
代表凋零之首.
|
interface |
Wolf
代表狼.
|
interface |
Zombie
代表僵尸.
|
interface |
ZombieHorse
Represents a ZombieHorse - variant of
AbstractHorse . |
interface |
ZombieVillager
|
限定符和类型 | 方法和说明 |
---|---|
Entity |
LivingEntity.getLeashHolder()
获取当前牵引此实体的实体。
|
Entity |
Entity.getPassenger()
已过时。
entities may have multiple passengers, use
getPassengers() |
Entity |
HumanEntity.getShoulderEntityLeft()
已过时。
Bukkit中目前还没有关于序列化实体的语义(格式)的良好定义. 请谨慎使用.
|
Entity |
HumanEntity.getShoulderEntityRight()
已过时。
Bukkit中目前还没有关于序列化实体的语义(格式)的良好定义. 请谨慎使用.
|
Entity |
TNTPrimed.getSource()
Gets the source of this primed TNT.
|
Entity |
Player.getSpectatorTarget()
Gets the entity which is followed by the camera when in
GameMode.SPECTATOR . |
Entity |
ShulkerBullet.getTarget()
Retrieve the target of this bullet.
|
Entity |
Entity.getVehicle()
Get the vehicle that this player is inside.
|
限定符和类型 | 方法和说明 |
---|---|
java.lang.Class<? extends Entity> |
EntityType.getEntityClass() |
java.util.List<Entity> |
Entity.getNearbyEntities(double x,
double y,
double z)
Returns a list of entities within a bounding box centered around this
entity
|
java.util.List<Entity> |
Entity.getPassengers()
Gets a list of passengers of this vehicle.
|
限定符和类型 | 方法和说明 |
---|---|
boolean |
Entity.addPassenger(Entity passenger)
Add a passenger to the vehicle.
|
void |
Damageable.damage(double amount,
Entity source)
强制某实体伤害这个实体。
|
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, use
getPassengers() |
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 in
GameMode.SPECTATOR . |
void |
ShulkerBullet.setTarget(Entity target)
Sets the target of this bullet
|
boolean |
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.
|
限定符和类型 | 接口和说明 |
---|---|
interface |
CommandMinecart
代表命令方块矿车.
|
interface |
ExplosiveMinecart
代表TNT矿车,可以被引爆.
|
interface |
HopperMinecart
代表漏斗矿车.
|
interface |
PoweredMinecart
代表动力矿车.当玩家往动力矿车里放
燃料 后它就会自己移动. |
interface |
RideableMinecart
代表可乘坐的矿车.
|
interface |
SpawnerMinecart
代表有
刷怪箱 在里面的矿车(即刷怪箱矿车). |
interface |
StorageMinecart
代表运输矿车,你可以使用
InventoryHolder 里的方法来访问. |
限定符和类型 | 方法和说明 |
---|---|
Entity |
CauldronLevelChangeEvent.getEntity()
获取哪个实体触发该事件,值有可能为Null.
|
Entity |
EntityBlockFormEvent.getEntity()
获取被建造的实体.
|
Entity |
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) |
限定符和类型 | 字段和说明 |
---|---|
protected Entity |
EntityEvent.entity |
限定符和类型 | 方法和说明 |
---|---|
Entity |
EntityCombustByEntityEvent.getCombuster()
返回造成燃烧的实体.
|
Entity |
EntityDamageByEntityEvent.getDamager()
返回造成这次伤害的实体
原文:
Returns the entity that damaged the defender.
|
Entity |
EntityEvent.getEntity()
返回这个事件所涉及的实体.
|
Entity |
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 event
|
Entity |
EntityTargetEvent.getTarget()
Get the entity that this is targeting.
|
限定符和类型 | 方法和说明 |
---|---|
void |
EntityShootBowEvent.setProjectile(Entity projectile)
Replaces the projectile which will be launched
|
void |
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.
|
限定符和类型 | 方法和说明 |
---|---|
Entity |
HangingBreakByEntityEvent.getRemover()
获取移除这个悬挂实体的实体.
|
构造器和说明 |
---|
HangingBreakByEntityEvent(Hanging hanging,
Entity remover) |
HangingBreakByEntityEvent(Hanging hanging,
Entity remover,
HangingBreakEvent.RemoveCause cause) |
限定符和类型 | 字段和说明 |
---|---|
protected Entity |
PlayerInteractEntityEvent.clickedEntity |
限定符和类型 | 方法和说明 |
---|---|
Entity |
PlayerFishEvent.getCaught()
Gets the entity caught by the player.
|
Entity |
PlayerShearEntityEvent.getEntity()
获得正在被玩家剪羊毛的实体对象.
|
Entity |
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) |
限定符和类型 | 方法和说明 |
---|---|
Entity |
VehicleDestroyEvent.getAttacker()
获取损毁载具的实体,可能为null.
|
Entity |
VehicleDamageEvent.getAttacker()
获取攻击这个载具的实体.
|
Entity |
VehicleEnterEvent.getEntered()
获取进入到载具中的实体.
|
Entity |
VehicleEntityCollisionEvent.getEntity() |
构造器和说明 |
---|
VehicleDamageEvent(Vehicle vehicle,
Entity attacker,
double damage) |
VehicleDestroyEvent(Vehicle vehicle,
Entity attacker) |
VehicleEnterEvent(Vehicle vehicle,
Entity entered) |
VehicleEntityCollisionEvent(Vehicle vehicle,
Entity entity) |
限定符和类型 | 方法和说明 |
---|---|
Entity |
EntityEquipment.getHolder()
获取此EntityEquipment所属的实体
原文: Get the entity this EntityEquipment belongs to
|