程序包 | 说明 |
---|---|
org.bukkit |
Bukkit的常用类.
|
org.bukkit.configuration |
专门用于处理插件运行时配置的类.
|
org.bukkit.entity |
为在
世界 内存在的非三维像素单位(实体)提供的接口,包含玩家、怪物、抛射物等. |
org.bukkit.event.block | |
org.bukkit.event.entity | |
org.bukkit.event.player | |
org.bukkit.projectiles |
代表一个抛射物的抛射源的类的集合.
|
org.bukkit.util |
提供多种目的和单一目的的类以简化各种编程概念.
|
限定符和类型 | 方法和说明 |
---|---|
Vector |
Location.getDirection()
获取本位置所面向的方向的单位向量.
|
Vector |
Location.toVector()
基于此位置构造一个新的
向量 . |
限定符和类型 | 方法和说明 |
---|---|
Location |
Location.add(Vector vec)
将本位置的坐标加上一个向量的坐标.
|
Location |
Location.setDirection(Vector vector)
|
Arrow |
World.spawnArrow(Location location,
Vector direction,
float speed,
float spread)
|
<T extends Arrow> |
World.spawnArrow(Location location,
Vector direction,
float speed,
float spread,
java.lang.Class<T> clazz)
Creates an arrow entity of the given class at the given
Location |
Location |
Location.subtract(Vector vec)
从本位置的坐标中减去向量的坐标.
|
限定符和类型 | 方法和说明 |
---|---|
Vector |
MemorySection.getVector(java.lang.String path) |
Vector |
ConfigurationSection.getVector(java.lang.String path)
在指定路径获取一个Vector类型的值.
|
Vector |
MemorySection.getVector(java.lang.String path,
Vector def) |
Vector |
ConfigurationSection.getVector(java.lang.String path,
Vector def)
在指定路径上获取一个
Vector , 如果无法获取, 则直接返回默认值. |
限定符和类型 | 方法和说明 |
---|---|
Vector |
MemorySection.getVector(java.lang.String path,
Vector def) |
Vector |
ConfigurationSection.getVector(java.lang.String path,
Vector def)
在指定路径上获取一个
Vector , 如果无法获取, 则直接返回默认值. |
限定符和类型 | 方法和说明 |
---|---|
Vector |
Minecart.getDerailedVelocityMod()
Gets the derailed velocity modifier.
|
Vector |
Fireball.getDirection()
Retrieve the direction this fireball is heading toward
|
Vector |
Minecart.getFlyingVelocityMod()
Gets the flying velocity modifier.
|
Vector |
Entity.getVelocity()
Gets this entity's current velocity
|
Vector |
Vehicle.getVelocity()
Gets the vehicle's velocity.
|
限定符和类型 | 方法和说明 |
---|---|
void |
Minecart.setDerailedVelocityMod(Vector derailed)
Sets the derailed velocity modifier.
|
void |
Fireball.setDirection(Vector direction)
Fireballs fly straight and do not take setVelocity(...) well.
|
void |
Minecart.setFlyingVelocityMod(Vector flying)
Sets the flying velocity modifier.
|
void |
Entity.setVelocity(Vector velocity)
Sets this entity's velocity
|
void |
Vehicle.setVelocity(Vector vel)
Sets the vehicle's velocity.
|
限定符和类型 | 方法和说明 |
---|---|
Vector |
BlockDispenseEvent.getVelocity()
获取物品射出的速度、角度.
|
限定符和类型 | 方法和说明 |
---|---|
void |
BlockDispenseEvent.setVelocity(Vector vel)
设置物品射出的速度、角度.
|
构造器和说明 |
---|
BlockDispenseEvent(Block block,
ItemStack dispensed,
Vector velocity) |
限定符和类型 | 方法和说明 |
---|---|
Vector |
EntityPortalExitEvent.getAfter()
Gets a copy of the velocity that the entity will have after exiting the
portal.
|
Vector |
EntityPortalExitEvent.getBefore()
Gets a copy of the velocity that the entity has before entering the
portal.
|
限定符和类型 | 方法和说明 |
---|---|
void |
EntityPortalExitEvent.setAfter(Vector after)
Sets the velocity that the entity will have after exiting the portal.
|
构造器和说明 |
---|
EntityPortalExitEvent(Entity entity,
Location from,
Location to,
Vector before,
Vector after) |
限定符和类型 | 方法和说明 |
---|---|
Vector |
PlayerInteractAtEntityEvent.getClickedPosition() |
Vector |
PlayerVelocityEvent.getVelocity()
得到玩家目前的移动速度.
|
限定符和类型 | 方法和说明 |
---|---|
void |
PlayerVelocityEvent.setVelocity(Vector velocity)
设置玩家移动速度.
|
构造器和说明 |
---|
PlayerInteractAtEntityEvent(Player who,
Entity clickedEntity,
Vector position) |
PlayerInteractAtEntityEvent(Player who,
Entity clickedEntity,
Vector position,
EquipmentSlot hand) |
PlayerVelocityEvent(Player player,
Vector velocity) |
限定符和类型 | 方法和说明 |
---|---|
<T extends Projectile> |
ProjectileSource.launchProjectile(java.lang.Class<? extends T> projectile,
Vector velocity)
让ProjectileSource以一个初始速度向量发射
Projectile 。 |
限定符和类型 | 类和说明 |
---|---|
class |
BlockVector
这是一个带有可以向下取整XYZ坐标函数的向量类,就像WorldEdit中的BlockVector.
|
限定符和类型 | 方法和说明 |
---|---|
Vector |
Vector.add(Vector vec)
将本向量的坐标加上另一个向量的坐标.
|
Vector |
Vector.clone()
克隆此向量.
|
Vector |
Vector.copy(Vector vec)
将本向量的坐标全部设为另一个向量的坐标.
|
Vector |
Vector.crossProduct(Vector o)
将本向量的坐标设为两个向量的叉积.
|
static Vector |
Vector.deserialize(java.util.Map<java.lang.String,java.lang.Object> args) |
Vector |
Vector.divide(Vector vec)
将本向量的坐标除以另一个向量的坐标.
|
Vector |
Vector.getCrossProduct(Vector o)
返回一个新的向量,其坐标为本向量与另一个向量的叉积.
|
static Vector |
Vector.getMaximum(Vector v1,
Vector v2)
获取两个向量坐标中更大的那些坐标组成的新向量.
|
Vector |
Vector.getMidpoint(Vector other)
获取一个新的向量,它的值为本向量和另一个向量间的连线的中点.
|
static Vector |
Vector.getMinimum(Vector v1,
Vector v2)
获取两个向量坐标中更小的那些坐标组成的新向量.
|
static Vector |
Vector.getRandom()
获取一个随机向量,其坐标值均为0到1之间(不含1).
|
Vector |
Vector.midpoint(Vector other)
设置本向量的坐标为两个向量连线的中点.
|
Vector |
Vector.multiply(double m)
向量的数乘,将向量在所有轴上扩展某个倍数.
|
Vector |
Vector.multiply(float m)
向量的数乘,将向量在所有轴上扩展某个倍数.
|
Vector |
Vector.multiply(int m)
向量的数乘,将向量在所有轴上扩展某个倍数.
|
Vector |
Vector.multiply(Vector vec)
将本向量的坐标乘上另一个向量的坐标.
|
Vector |
Vector.normalize()
将本向量转化为单位向量(模为1的向量).
|
Vector |
Vector.setX(double x)
设置X坐标.
|
Vector |
Vector.setX(float x)
设置X坐标.
|
Vector |
Vector.setX(int x)
设置X坐标.
|
Vector |
Vector.setY(double y)
设置Y坐标.
|
Vector |
Vector.setY(float y)
设置Y坐标.
|
Vector |
Vector.setY(int y)
设置Y坐标.
|
Vector |
Vector.setZ(double z)
设置Z坐标.
|
Vector |
Vector.setZ(float z)
设置Z坐标.
|
Vector |
Vector.setZ(int z)
设置Z坐标.
|
Vector |
Vector.subtract(Vector vec)
从本向量的坐标中减去另一个向量的坐标.
|
Vector |
Vector.zero()
将本向量设为原点向量.
|
限定符和类型 | 方法和说明 |
---|---|
Vector |
Vector.add(Vector vec)
将本向量的坐标加上另一个向量的坐标.
|
float |
Vector.angle(Vector other)
获取本向量与另一个向量的夹角,用弧度表示.
|
Vector |
Vector.copy(Vector vec)
将本向量的坐标全部设为另一个向量的坐标.
|
Vector |
Vector.crossProduct(Vector o)
将本向量的坐标设为两个向量的叉积.
|
double |
Vector.distance(Vector o)
获取本向量与与另一个向量之间的距离.
|
double |
Vector.distanceSquared(Vector o)
获取本向量与与另一个向量之间的距离的平方.
|
Vector |
Vector.divide(Vector vec)
将本向量的坐标除以另一个向量的坐标.
|
double |
Vector.dot(Vector other)
计算本向量与另一个向量的点积,定义为x1*x2+y1*y2+z1*z2.
|
Vector |
Vector.getCrossProduct(Vector o)
返回一个新的向量,其坐标为本向量与另一个向量的叉积.
|
static Vector |
Vector.getMaximum(Vector v1,
Vector v2)
获取两个向量坐标中更大的那些坐标组成的新向量.
|
Vector |
Vector.getMidpoint(Vector other)
获取一个新的向量,它的值为本向量和另一个向量间的连线的中点.
|
static Vector |
Vector.getMinimum(Vector v1,
Vector v2)
获取两个向量坐标中更小的那些坐标组成的新向量.
|
boolean |
Vector.isInAABB(Vector min,
Vector max)
判断本向量是否在一个AABB包围盒中.
|
boolean |
Vector.isInSphere(Vector origin,
double radius)
判断本向量是否在一个球形空间中.
|
Vector |
Vector.midpoint(Vector other)
设置本向量的坐标为两个向量连线的中点.
|
Vector |
Vector.multiply(Vector vec)
将本向量的坐标乘上另一个向量的坐标.
|
Vector |
Vector.subtract(Vector vec)
从本向量的坐标中减去另一个向量的坐标.
|
构造器和说明 |
---|
BlockIterator(World world,
Vector start,
Vector direction,
double yOffset,
int maxDistance)
BlockIterator的构造函数.
|
BlockVector(Vector vec)
使用另一个向量来创建向量.
|