Package | Description |
---|---|
org.bukkit |
The root package of the Bukkit API, contains generalized API classes.
|
org.bukkit.block |
Classes used to manipulate the voxels in a
world ,
including special states. |
org.bukkit.configuration |
Classes dedicated to handling a plugin's runtime configuration.
|
org.bukkit.entity |
Interfaces for non-voxel objects that can exist in a
world , including all players, monsters, projectiles, etc. |
org.bukkit.event.block | |
org.bukkit.event.entity | |
org.bukkit.event.player | |
org.bukkit.projectiles |
Classes to represent the source of a projectile
|
org.bukkit.util |
Multi and single purpose classes to facilitate various programmatic
concepts.
|
Modifier and Type | Method | Description |
---|---|---|
@NotNull Vector |
Location.getDirection() |
Gets a unit-vector pointing in the direction that this Location is
facing.
|
@NotNull Vector |
Location.toVector() |
Constructs a new
Vector based on this Location |
Modifier and Type | Method | Description |
---|---|---|
@NotNull Location |
Location.add(@NotNull Vector vec) |
Adds the location by a vector.
|
@Nullable RayTraceResult |
World.rayTrace(@NotNull Location start,
@NotNull Vector direction,
double maxDistance,
@NotNull FluidCollisionMode fluidCollisionMode,
boolean ignorePassableBlocks,
double raySize,
@Nullable Predicate<Entity> filter) |
Performs a ray trace that checks for both block and entity collisions.
|
@Nullable RayTraceResult |
World.rayTraceBlocks(@NotNull Location start,
@NotNull Vector direction,
double maxDistance) |
Performs a ray trace that checks for block collisions using the blocks'
precise collision shapes.
|
@Nullable RayTraceResult |
World.rayTraceBlocks(@NotNull Location start,
@NotNull Vector direction,
double maxDistance,
@NotNull FluidCollisionMode fluidCollisionMode) |
Performs a ray trace that checks for block collisions using the blocks'
precise collision shapes.
|
@Nullable RayTraceResult |
World.rayTraceBlocks(@NotNull Location start,
@NotNull Vector direction,
double maxDistance,
@NotNull FluidCollisionMode fluidCollisionMode,
boolean ignorePassableBlocks) |
Performs a ray trace that checks for block collisions using the blocks'
precise collision shapes.
|
@Nullable RayTraceResult |
World.rayTraceEntities(@NotNull Location start,
@NotNull Vector direction,
double maxDistance) |
Performs a ray trace that checks for entity collisions.
|
@Nullable RayTraceResult |
World.rayTraceEntities(@NotNull Location start,
@NotNull Vector direction,
double maxDistance,
double raySize) |
Performs a ray trace that checks for entity collisions.
|
@Nullable RayTraceResult |
World.rayTraceEntities(@NotNull Location start,
@NotNull Vector direction,
double maxDistance,
double raySize,
@Nullable Predicate<Entity> filter) |
Performs a ray trace that checks for entity collisions.
|
@Nullable RayTraceResult |
World.rayTraceEntities(@NotNull Location start,
@NotNull Vector direction,
double maxDistance,
@Nullable Predicate<Entity> filter) |
Performs a ray trace that checks for entity collisions.
|
@NotNull Location |
Location.setDirection(@NotNull Vector vector) |
|
@NotNull Arrow |
World.spawnArrow(@NotNull Location location,
@NotNull Vector direction,
float speed,
float spread) |
|
<T extends AbstractArrow> |
World.spawnArrow(@NotNull Location location,
@NotNull Vector direction,
float speed,
float spread,
@NotNull Class<T> clazz) |
Creates an arrow entity of the given class at the given
Location |
@NotNull Location |
Location.subtract(@NotNull Vector vec) |
Subtracts the location by a vector.
|
Modifier and Type | Method | Description |
---|---|---|
@NotNull Vector |
BlockFace.getDirection() |
Gets the normal vector corresponding to this block face.
|
Modifier and Type | Method | Description |
---|---|---|
@Nullable RayTraceResult |
Block.rayTrace(@NotNull Location start,
@NotNull Vector direction,
double maxDistance,
@NotNull FluidCollisionMode fluidCollisionMode) |
Performs a ray trace that checks for collision with this specific block
in its current state using its precise collision shape.
|
Modifier and Type | Method | Description |
---|---|---|
@Nullable Vector |
ConfigurationSection.getVector(@NotNull String path) |
Gets the requested Vector by path.
|
@Nullable Vector |
ConfigurationSection.getVector(@NotNull String path,
@Nullable Vector def) |
Gets the requested
Vector by path, returning a default value if
not found. |
@Nullable Vector |
MemorySection.getVector(@NotNull String path) |
|
@Nullable Vector |
MemorySection.getVector(@NotNull String path,
@Nullable Vector def) |
Modifier and Type | Method | Description |
---|---|---|
@Nullable Vector |
ConfigurationSection.getVector(@NotNull String path,
@Nullable Vector def) |
Gets the requested
Vector by path, returning a default value if
not found. |
@Nullable Vector |
MemorySection.getVector(@NotNull String path,
@Nullable Vector def) |
Modifier and Type | Method | Description |
---|---|---|
@NotNull Vector |
Minecart.getDerailedVelocityMod() |
Gets the derailed velocity modifier.
|
@NotNull Vector |
Fireball.getDirection() |
Retrieve the direction this fireball is heading toward
|
@NotNull Vector |
Minecart.getFlyingVelocityMod() |
Gets the flying velocity modifier.
|
@NotNull Vector |
Entity.getVelocity() |
Gets this entity's current velocity
|
@NotNull Vector |
Vehicle.getVelocity() |
Gets the vehicle's velocity.
|
Modifier and Type | Method | Description |
---|---|---|
void |
Minecart.setDerailedVelocityMod(@NotNull Vector derailed) |
Sets the derailed velocity modifier.
|
void |
Fireball.setDirection(@NotNull Vector direction) |
Fireballs fly straight and do not take setVelocity(...) well.
|
void |
Minecart.setFlyingVelocityMod(@NotNull Vector flying) |
Sets the flying velocity modifier.
|
void |
Entity.setVelocity(@NotNull Vector velocity) |
Sets this entity's velocity
|
void |
Vehicle.setVelocity(@NotNull Vector vel) |
Sets the vehicle's velocity.
|
Modifier and Type | Method | Description |
---|---|---|
@NotNull Vector |
BlockDispenseEvent.getVelocity() |
Gets the velocity.
|
Modifier and Type | Method | Description |
---|---|---|
void |
BlockDispenseEvent.setVelocity(@NotNull Vector vel) |
Sets the velocity of the item being dispensed.
|
Constructor | Description |
---|---|
BlockDispenseEvent(@NotNull Block block,
@NotNull ItemStack dispensed,
@NotNull Vector velocity) |
Modifier and Type | Method | Description |
---|---|---|
@NotNull Vector |
EntityPortalExitEvent.getAfter() |
Gets a copy of the velocity that the entity will have after exiting the
portal.
|
@NotNull Vector |
EntityPortalExitEvent.getBefore() |
Gets a copy of the velocity that the entity has before entering the
portal.
|
Modifier and Type | Method | Description |
---|---|---|
void |
EntityPortalExitEvent.setAfter(@NotNull Vector after) |
Sets the velocity that the entity will have after exiting the portal.
|
Constructor | Description |
---|---|
EntityPortalExitEvent(@NotNull Entity entity,
@NotNull Location from,
@NotNull Location to,
@NotNull Vector before,
@NotNull Vector after) |
Modifier and Type | Method | Description |
---|---|---|
@NotNull Vector |
PlayerInteractAtEntityEvent.getClickedPosition() |
|
@NotNull Vector |
PlayerVelocityEvent.getVelocity() |
Gets the velocity vector that will be sent to the player
|
Modifier and Type | Method | Description |
---|---|---|
void |
PlayerVelocityEvent.setVelocity(@NotNull Vector velocity) |
Sets the velocity vector that will be sent to the player
|
Constructor | Description |
---|---|
PlayerInteractAtEntityEvent(@NotNull Player who,
@NotNull Entity clickedEntity,
@NotNull Vector position) |
|
PlayerInteractAtEntityEvent(@NotNull Player who,
@NotNull Entity clickedEntity,
@NotNull Vector position,
@NotNull EquipmentSlot hand) |
|
PlayerVelocityEvent(@NotNull Player player,
@NotNull Vector velocity) |
Modifier and Type | Method | Description |
---|---|---|
<T extends Projectile> |
ProjectileSource.launchProjectile(@NotNull Class<? extends T> projectile,
@Nullable Vector velocity) |
Launches a
Projectile from the ProjectileSource with an
initial velocity. |
Modifier and Type | Class | Description |
---|---|---|
class |
BlockVector |
A vector with a hash function that floors the X, Y, Z components, a la
BlockVector in WorldEdit.
|
Modifier and Type | Method | Description |
---|---|---|
@NotNull Vector |
Vector.add(@NotNull Vector vec) |
Adds a vector to this one
|
@NotNull Vector |
Vector.clone() |
Get a new vector.
|
@NotNull Vector |
Vector.copy(@NotNull Vector vec) |
Copies another vector
|
@NotNull Vector |
Vector.crossProduct(@NotNull Vector o) |
Calculates the cross product of this vector with another.
|
static @NotNull Vector |
Vector.deserialize(@NotNull Map<String,Object> args) |
|
@NotNull Vector |
Vector.divide(@NotNull Vector vec) |
Divides the vector by another.
|
@NotNull Vector |
BoundingBox.getCenter() |
Gets the center of the bounding box.
|
@NotNull Vector |
Vector.getCrossProduct(@NotNull Vector o) |
Calculates the cross product of this vector with another without mutating
the original.
|
@NotNull Vector |
RayTraceResult.getHitPosition() |
Gets the exact position of the hit.
|
@NotNull Vector |
BoundingBox.getMax() |
Gets the maximum corner as vector.
|
static @NotNull Vector |
Vector.getMaximum(@NotNull Vector v1,
@NotNull Vector v2) |
Gets the maximum components of two vectors.
|
@NotNull Vector |
Vector.getMidpoint(@NotNull Vector other) |
Gets a new midpoint vector between this vector and another.
|
@NotNull Vector |
BoundingBox.getMin() |
Gets the minimum corner as vector.
|
static @NotNull Vector |
Vector.getMinimum(@NotNull Vector v1,
@NotNull Vector v2) |
Gets the minimum components of two vectors.
|
static @NotNull Vector |
Vector.getRandom() |
Gets a random vector with components having a random value between 0
and 1.
|
@NotNull Vector |
Vector.midpoint(@NotNull Vector other) |
Sets this vector to the midpoint between this vector and another.
|
@NotNull Vector |
Vector.multiply(double m) |
Performs scalar multiplication, multiplying all components with a
scalar.
|
@NotNull Vector |
Vector.multiply(float m) |
Performs scalar multiplication, multiplying all components with a
scalar.
|
@NotNull Vector |
Vector.multiply(int m) |
Performs scalar multiplication, multiplying all components with a
scalar.
|
@NotNull Vector |
Vector.multiply(@NotNull Vector vec) |
Multiplies the vector by another.
|
@NotNull Vector |
Vector.normalize() |
Converts this vector to a unit vector (a vector with length of 1).
|
@NotNull Vector |
Vector.rotateAroundAxis(@NotNull Vector axis,
double angle) |
Rotates the vector around a given arbitrary axis in 3 dimensional space.
|
@NotNull Vector |
Vector.rotateAroundNonUnitAxis(@NotNull Vector axis,
double angle) |
Rotates the vector around a given arbitrary axis in 3 dimensional space.
|
@NotNull Vector |
Vector.rotateAroundX(double angle) |
Rotates the vector around the x axis.
|
@NotNull Vector |
Vector.rotateAroundY(double angle) |
Rotates the vector around the y axis.
|
@NotNull Vector |
Vector.rotateAroundZ(double angle) |
Rotates the vector around the z axis
|
@NotNull Vector |
Vector.setX(double x) |
Set the X component.
|
@NotNull Vector |
Vector.setX(float x) |
Set the X component.
|
@NotNull Vector |
Vector.setX(int x) |
Set the X component.
|
@NotNull Vector |
Vector.setY(double y) |
Set the Y component.
|
@NotNull Vector |
Vector.setY(float y) |
Set the Y component.
|
@NotNull Vector |
Vector.setY(int y) |
Set the Y component.
|
@NotNull Vector |
Vector.setZ(double z) |
Set the Z component.
|
@NotNull Vector |
Vector.setZ(float z) |
Set the Z component.
|
@NotNull Vector |
Vector.setZ(int z) |
Set the Z component.
|
@NotNull Vector |
Vector.subtract(@NotNull Vector vec) |
Subtracts a vector from this one.
|
@NotNull Vector |
Vector.zero() |
Zero this vector's components.
|
Modifier and Type | Method | Description |
---|---|---|
@NotNull Vector |
Vector.add(@NotNull Vector vec) |
Adds a vector to this one
|
float |
Vector.angle(@NotNull Vector other) |
Gets the angle between this vector and another in radians.
|
boolean |
BoundingBox.contains(@NotNull Vector position) |
Checks if this bounding box contains the specified position.
|
boolean |
BoundingBox.contains(@NotNull Vector min,
@NotNull Vector max) |
Checks if this bounding box fully contains the bounding box that is
defined by the given corners.
|
@NotNull Vector |
Vector.copy(@NotNull Vector vec) |
Copies another vector
|
@NotNull Vector |
Vector.crossProduct(@NotNull Vector o) |
Calculates the cross product of this vector with another.
|
double |
Vector.distance(@NotNull Vector o) |
Get the distance between this vector and another.
|
double |
Vector.distanceSquared(@NotNull Vector o) |
Get the squared distance between this vector and another.
|
@NotNull Vector |
Vector.divide(@NotNull Vector vec) |
Divides the vector by another.
|
double |
Vector.dot(@NotNull Vector other) |
Calculates the dot product of this vector with another.
|
@NotNull BoundingBox |
BoundingBox.expand(@NotNull Vector expansion) |
Expands this bounding box uniformly by the given values in both positive
and negative directions.
|
@NotNull BoundingBox |
BoundingBox.expand(@NotNull Vector direction,
double expansion) |
Expands this bounding box in the specified direction.
|
@NotNull BoundingBox |
BoundingBox.expandDirectional(@NotNull Vector direction) |
Expands this bounding box in the specified direction.
|
@NotNull Vector |
Vector.getCrossProduct(@NotNull Vector o) |
Calculates the cross product of this vector with another without mutating
the original.
|
static @NotNull Vector |
Vector.getMaximum(@NotNull Vector v1,
@NotNull Vector v2) |
Gets the maximum components of two vectors.
|
@NotNull Vector |
Vector.getMidpoint(@NotNull Vector other) |
Gets a new midpoint vector between this vector and another.
|
static @NotNull Vector |
Vector.getMinimum(@NotNull Vector v1,
@NotNull Vector v2) |
Gets the minimum components of two vectors.
|
boolean |
Vector.isInAABB(@NotNull Vector min,
@NotNull Vector max) |
Returns whether this vector is in an axis-aligned bounding box.
|
boolean |
Vector.isInSphere(@NotNull Vector origin,
double radius) |
Returns whether this vector is within a sphere.
|
@NotNull Vector |
Vector.midpoint(@NotNull Vector other) |
Sets this vector to the midpoint between this vector and another.
|
@NotNull Vector |
Vector.multiply(@NotNull Vector vec) |
Multiplies the vector by another.
|
static @NotNull BoundingBox |
BoundingBox.of(@NotNull Vector center,
double x,
double y,
double z) |
Creates a new bounding box using the given center and extents.
|
static @NotNull BoundingBox |
BoundingBox.of(@NotNull Vector corner1,
@NotNull Vector corner2) |
Creates a new bounding box using the coordinates of the given vectors as
corners.
|
boolean |
BoundingBox.overlaps(@NotNull Vector min,
@NotNull Vector max) |
Checks if this bounding box overlaps with the bounding box that is
defined by the given corners.
|
@Nullable RayTraceResult |
BoundingBox.rayTrace(@NotNull Vector start,
@NotNull Vector direction,
double maxDistance) |
Calculates the intersection of this bounding box with the specified line
segment.
|
@NotNull Vector |
Vector.rotateAroundAxis(@NotNull Vector axis,
double angle) |
Rotates the vector around a given arbitrary axis in 3 dimensional space.
|
@NotNull Vector |
Vector.rotateAroundNonUnitAxis(@NotNull Vector axis,
double angle) |
Rotates the vector around a given arbitrary axis in 3 dimensional space.
|
@NotNull BoundingBox |
BoundingBox.shift(@NotNull Vector shift) |
Shifts this bounding box by the given amounts.
|
@NotNull Vector |
Vector.subtract(@NotNull Vector vec) |
Subtracts a vector from this one.
|
@NotNull BoundingBox |
BoundingBox.union(@NotNull Vector position) |
Expands this bounding box to contain (or border) the specified position.
|
Constructor | Description |
---|---|
BlockIterator(@NotNull World world,
@NotNull Vector start,
@NotNull Vector direction,
double yOffset,
int maxDistance) |
Constructs the BlockIterator.
|
BlockVector(@NotNull Vector vec) |
Construct the vector with another vector.
|
RayTraceResult(@NotNull Vector hitPosition) |
Creates a RayTraceResult.
|
RayTraceResult(@NotNull Vector hitPosition,
@Nullable BlockFace hitBlockFace) |
Creates a RayTraceResult.
|
RayTraceResult(@NotNull Vector hitPosition,
@Nullable Block hitBlock,
@Nullable BlockFace hitBlockFace) |
Creates a RayTraceResult.
|
RayTraceResult(@NotNull Vector hitPosition,
@Nullable Entity hitEntity) |
Creates a RayTraceResult.
|
RayTraceResult(@NotNull Vector hitPosition,
@Nullable Entity hitEntity,
@Nullable BlockFace hitBlockFace) |
Creates a RayTraceResult.
|
Copyright © 2020. All rights reserved.