Package | Description |
---|---|
com.destroystokyo.paper | |
com.destroystokyo.paper.entity | |
com.destroystokyo.paper.event.entity | |
com.destroystokyo.paper.event.player | |
com.destroystokyo.paper.event.server | |
io.papermc.paper.event.entity | |
io.papermc.paper.event.world | |
io.papermc.paper.event.world.border | |
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.boss |
Classes concerning the creation of boss bars that appear at the top of the
player's screen.
|
org.bukkit.command |
Classes relating to handling specialized non-chat player input.
|
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.entity.memory |
Classes concerning an entity's persistent memory.
|
org.bukkit.event.block | |
org.bukkit.event.entity | |
org.bukkit.event.player | |
org.bukkit.event.server |
Events relating to programmatic state
changes on the server. |
org.bukkit.event.vehicle |
Events relating to vehicular entities . |
org.bukkit.event.world | |
org.bukkit.generator |
Classes to facilitate
world generation
implementation. |
org.bukkit.inventory |
Classes involved in manipulating player inventories and item interactions.
|
org.bukkit.inventory.meta |
The interfaces used when manipulating extra data can can be stored inside
item stacks . |
org.bukkit.loot |
Classes relevant to loot table manipulation and generation.
|
org.bukkit.util |
Multi and single purpose classes to facilitate various programmatic
concepts.
|
org.spigotmc.event.player |
Spigot-specific player events.
|
Modifier and Type | Method and Description |
---|---|
@Nullable Location |
ParticleBuilder.location() |
Modifier and Type | Method and Description |
---|---|
@NotNull ParticleBuilder |
ParticleBuilder.location(@NotNull Location location)
Sets the location of where to spawn the particle
|
Modifier and Type | Method and Description |
---|---|
@Nullable Location |
Pathfinder.PathResult.getFinalPoint() |
@Nullable Location |
Pathfinder.PathResult.getNextPoint() |
Modifier and Type | Method and Description |
---|---|
@Nullable Pathfinder.PathResult |
Pathfinder.findPath(@NotNull Location loc)
Calculates a destination for the Entity to navigate to, but does not set it
as the current target.
|
default boolean |
Pathfinder.moveTo(@NotNull Location loc)
Calculates a destination for the Entity to navigate to, and sets it with default speed
as the current target.
|
default boolean |
Pathfinder.moveTo(@NotNull Location loc,
double speed)
Calculates a destination for the Entity to navigate to, with desired speed
as the current target.
|
Modifier and Type | Method and Description |
---|---|
@NotNull Location |
EntityPathfindEvent.getLoc()
The Location of where the entity is about to move to.
|
@NotNull Location |
TurtleStartDiggingEvent.getLocation()
Get the location where the turtle is digging
|
@NotNull Location |
TurtleLayEggEvent.getLocation()
Get the location where the eggs are being laid
|
@NotNull Location |
PreSpawnerSpawnEvent.getSpawnerLocation() |
@NotNull Location |
PreCreatureSpawnEvent.getSpawnLocation() |
Modifier and Type | Method and Description |
---|---|
@NotNull Location |
PlayerJumpEvent.getFrom()
Gets the location this player jumped from
|
@NotNull Location |
PlayerPostRespawnEvent.getRespawnedLocation()
Returns the location of the respawned player
|
@NotNull Location |
PlayerJumpEvent.getTo()
Gets the location this player jumped to
This information is based on what the client sends, it typically
has little relation to the arc of the jump at any given point.
|
Modifier and Type | Method and Description |
---|---|
void |
PlayerJumpEvent.setFrom(@NotNull Location from)
Sets the location to mark as where the player jumped from
|
Constructor and Description |
---|
PlayerInitialSpawnEvent(@NotNull Player who,
@NotNull Location spawnLocation)
Deprecated.
|
PlayerJumpEvent(@NotNull Player player,
@NotNull Location from,
@NotNull Location to) |
PlayerJumpEvent(@NotNull Player player,
@NotNull Location from,
@NotNull Location to) |
PlayerPostRespawnEvent(@NotNull Player respawnPlayer,
@NotNull Location respawnedLocation,
boolean isBedSpawn) |
PlayerTeleportEndGatewayEvent(@NotNull Player player,
@NotNull Location from,
@NotNull Location to,
@NotNull EndGateway gateway) |
PlayerTeleportEndGatewayEvent(@NotNull Player player,
@NotNull Location from,
@NotNull Location to,
@NotNull EndGateway gateway) |
Modifier and Type | Method and Description |
---|---|
@Nullable Location |
AsyncTabCompleteEvent.getLocation() |
Constructor and Description |
---|
AsyncTabCompleteEvent(@NotNull CommandSender sender,
@NotNull List<String> completions,
@NotNull String buffer,
boolean isCommand,
@Nullable Location loc)
Deprecated.
|
AsyncTabCompleteEvent(@NotNull CommandSender sender,
@NotNull String buffer,
boolean isCommand,
@Nullable Location loc) |
Modifier and Type | Method and Description |
---|---|
@NotNull Location |
EntityMoveEvent.getFrom()
Gets the location this entity moved from
|
@NotNull Location |
EntityMoveEvent.getTo()
Gets the location this entity moved to
|
Modifier and Type | Method and Description |
---|---|
void |
EntityMoveEvent.setFrom(@NotNull Location from)
Sets the location to mark as where the entity moved from
|
void |
EntityMoveEvent.setTo(@NotNull Location to)
Sets the location that this entity will move to
|
Constructor and Description |
---|
EntityMoveEvent(@NotNull LivingEntity entity,
@NotNull Location from,
@NotNull Location to) |
EntityMoveEvent(@NotNull LivingEntity entity,
@NotNull Location from,
@NotNull Location to) |
Modifier and Type | Method and Description |
---|---|
@NotNull Location |
StructureLocateEvent.getOrigin()
Gets the
Location from which the search is to be conducted. |
@Nullable Location |
StructureLocateEvent.getResult()
Gets the location set as the structure location, if it was defined.
|
Modifier and Type | Method and Description |
---|---|
void |
StructureLocateEvent.setResult(@Nullable Location result)
Sets the result
Location . |
Constructor and Description |
---|
StructureLocateEvent(@NotNull World world,
@NotNull Location origin,
@NotNull StructureType structureType,
int radius,
boolean findUnexplored) |
Modifier and Type | Method and Description |
---|---|
@NotNull Location |
WorldBorderCenterChangeEvent.getNewCenter()
Gets the new center location for the world border.
|
@NotNull Location |
WorldBorderCenterChangeEvent.getOldCenter()
Gets the original center location of the world border.
|
Modifier and Type | Method and Description |
---|---|
void |
WorldBorderCenterChangeEvent.setNewCenter(@NotNull Location newCenter)
Sets the new center location for the world border.
|
Constructor and Description |
---|
WorldBorderCenterChangeEvent(@NotNull World world,
@NotNull WorldBorder worldBorder,
@NotNull Location oldCenter,
@NotNull Location newCenter) |
WorldBorderCenterChangeEvent(@NotNull World world,
@NotNull WorldBorder worldBorder,
@NotNull Location oldCenter,
@NotNull Location newCenter) |
Modifier and Type | Method and Description |
---|---|
@NotNull Location |
Location.add(double x,
double y,
double z)
Adds the location by another.
|
@NotNull Location |
Location.add(@NotNull Location vec)
Adds the location by another.
|
@NotNull Location |
Location.add(@NotNull Location base,
double x,
double y,
double z)
Takes the x/y/z from base and adds the specified x/y/z to it and returns self
This mutates this object, clone first.
|
@NotNull Location |
Location.add(@NotNull Vector vec)
Adds the location by a vector.
|
@NotNull Location |
Location.clone() |
static @NotNull Location |
Location.deserialize(@NotNull Map<String,Object> args)
Required method for deserialization
|
@Nullable Location |
OfflinePlayer.getBedSpawnLocation()
Gets the Location where the player will spawn at their bed, null if
they have not slept in one or their current bed spawn is invalid.
|
@NotNull Location |
WorldBorder.getCenter()
Gets the current border center.
|
@NotNull Location |
Raid.getLocation()
Gets the center location where the raid occurs.
|
default @NotNull Location |
World.getLocationAtKey(long key)
Gets the
Location at the given block key |
@NotNull Location |
World.getSpawnLocation()
Gets the default spawn
Location of this world |
@Nullable Location |
World.locateNearestBiome(@NotNull Location origin,
@NotNull Biome biome,
int radius)
Locates the nearest biome based on an origin, biome type, and radius to search.
|
@Nullable Location |
World.locateNearestBiome(@NotNull Location origin,
@NotNull Biome biome,
int radius,
int step)
Locates the nearest biome based on an origin, biome type, and radius to search
and step
|
@Nullable Location |
World.locateNearestStructure(@NotNull Location origin,
@NotNull StructureType structureType,
int radius,
boolean findUnexplored)
Find the closest nearby structure of a given
StructureType . |
@NotNull Location |
Location.multiply(double m)
Performs scalar multiplication, multiplying all components with a
scalar.
|
@NotNull Location |
Location.set(double x,
double y,
double z)
Sets the position of this Location and returns itself
This mutates this object, clone first.
|
@NotNull Location |
Location.setDirection(@NotNull Vector vector)
|
@NotNull Location |
Location.subtract(double x,
double y,
double z)
Subtracts the location by another.
|
@NotNull Location |
Location.subtract(@NotNull Location vec)
Subtracts the location by another.
|
@NotNull Location |
Location.subtract(@NotNull Location base,
double x,
double y,
double z)
Takes the x/y/z from base and subtracts the specified x/y/z to it and returns self
This mutates this object, clone first.
|
@NotNull Location |
Location.subtract(@NotNull Vector vec)
Subtracts the location by a vector.
|
@NotNull Location |
Location.toBlockLocation() |
@NotNull Location |
Location.toCenterLocation() |
@NotNull Location |
Location.toHighestLocation()
Returns a copy of this location except with y = getWorld().getHighestBlockYAt(this.getBlockX(), this.getBlockZ())
|
@NotNull Location |
Location.toHighestLocation(@NotNull HeightMap heightMap)
Returns a copy of this location except with y = getWorld().getHighestBlockYAt(this.getBlockX(), this.getBlockZ(), heightMap)
|
@NotNull Location |
Location.toHighestLocation(HeightmapType heightmap)
Deprecated.
|
@NotNull Location |
Location.zero()
Zero this location's components.
|
Modifier and Type | Method and Description |
---|---|
@NotNull Location |
Location.add(@NotNull Location vec)
Adds the location by another.
|
@NotNull Location |
Location.add(@NotNull Location base,
double x,
double y,
double z)
Takes the x/y/z from base and adds the specified x/y/z to it and returns self
This mutates this object, clone first.
|
static @NotNull ItemStack |
Bukkit.createExplorerMap(@NotNull World world,
@NotNull Location location,
@NotNull StructureType structureType)
Create a new explorer map targeting the closest nearby structure of a
given
StructureType . |
@NotNull ItemStack |
Server.createExplorerMap(@NotNull World world,
@NotNull Location location,
@NotNull StructureType structureType)
Create a new explorer map targeting the closest nearby structure of a
given
StructureType . |
static @NotNull ItemStack |
Bukkit.createExplorerMap(@NotNull World world,
@NotNull Location location,
@NotNull StructureType structureType,
int radius,
boolean findUnexplored)
Create a new explorer map targeting the closest nearby structure of a
given
StructureType . |
@NotNull ItemStack |
Server.createExplorerMap(@NotNull World world,
@NotNull Location location,
@NotNull StructureType structureType,
int radius,
boolean findUnexplored)
Create a new explorer map targeting the closest nearby structure of a
given
StructureType . |
default boolean |
World.createExplosion(@Nullable Entity source,
@NotNull Location loc,
float power)
Creates explosion at given location with given power, with the specified entity as the source.
|
default boolean |
World.createExplosion(@Nullable Entity source,
@NotNull Location loc,
float power,
boolean setFire)
Creates explosion at given location with given power and optionally
setting blocks on fire, with the specified entity as the source.
|
boolean |
World.createExplosion(@Nullable Entity source,
@NotNull Location loc,
float power,
boolean setFire,
boolean breakBlocks)
Creates explosion at given location with given power and optionally
setting blocks on fire, with the specified entity as the source.
|
boolean |
World.createExplosion(@NotNull Location loc,
float power)
Creates explosion at given coordinates with given power
|
boolean |
World.createExplosion(@NotNull Location loc,
float power,
boolean setFire)
Creates explosion at given coordinates with given power and optionally
setting blocks on fire.
|
boolean |
World.createExplosion(@NotNull Location loc,
float power,
boolean setFire,
boolean breakBlocks)
Creates explosion at given coordinates with given power and optionally
setting blocks on fire or breaking blocks.
|
boolean |
World.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.
|
double |
Location.distance(@NotNull Location o)
Get the distance between this location and another.
|
double |
Location.distanceSquared(@NotNull Location o)
Get the squared distance between this location and another.
|
@NotNull Item |
World.dropItem(@NotNull Location location,
@NotNull ItemStack item)
Drops an item at the specified
Location |
@NotNull Item |
World.dropItem(@NotNull Location location,
@NotNull ItemStack item,
@Nullable Consumer<Item> function)
Drops an item at the specified
Location
Note that functions will run before the entity is spawned |
@NotNull Item |
World.dropItemNaturally(@NotNull Location location,
@NotNull ItemStack item)
Drops an item at the specified
Location with a random offset |
@NotNull Item |
World.dropItemNaturally(@NotNull Location location,
@NotNull ItemStack item,
@Nullable Consumer<Item> function)
Drops an item at the specified
Location with a random offset
Note that functions will run before the entity is spawned |
boolean |
World.generateTree(@NotNull Location location,
@NotNull TreeType type)
Creates a tree at the given
Location |
boolean |
World.generateTree(@NotNull Location loc,
@NotNull TreeType type,
@NotNull BlockChangeDelegate delegate)
Creates a tree at the given
Location |
@NotNull Block |
World.getBlockAt(@NotNull Location location)
|
@NotNull Chunk |
World.getChunkAt(@NotNull Location location)
|
default CompletableFuture<Chunk> |
World.getChunkAtAsync(@NotNull Location loc)
Requests a
Chunk to be loaded at the given coordinates
This method makes no guarantee on how fast the chunk will load,
and will return the chunk to the callback at a later time. |
default CompletableFuture<Chunk> |
World.getChunkAtAsync(@NotNull Location loc,
boolean gen)
Requests a
Chunk to be loaded at the given coordinates
This method makes no guarantee on how fast the chunk will load,
and will return the chunk to the callback at a later time. |
default void |
World.getChunkAtAsync(@NotNull Location loc,
boolean gen,
Consumer<Chunk> cb)
|
default void |
World.getChunkAtAsync(@NotNull Location loc,
Consumer<Chunk> cb)
|
default void |
World.getChunkAtAsync(@NotNull Location loc,
@NotNull World.ChunkLoadCallback cb)
Deprecated.
Use either the Future or the Consumer based methods
|
default CompletableFuture<Chunk> |
World.getChunkAtAsyncUrgently(@NotNull Location loc)
Requests a
Chunk to be loaded at the given coordinates
This method makes no guarantee on how fast the chunk will load,
and will return the chunk to the callback at a later time. |
default CompletableFuture<Chunk> |
World.getChunkAtAsyncUrgently(@NotNull Location loc,
boolean gen)
Requests a
Chunk to be loaded at the given coordinates
This method makes no guarantee on how fast the chunk will load,
and will return the chunk to the callback at a later time. |
static long |
Chunk.getChunkKey(@NotNull Location loc) |
@NotNull Block |
World.getHighestBlockAt(@NotNull Location location)
Gets the highest non-empty (impassable) block at the given coordinates.
|
@NotNull Block |
World.getHighestBlockAt(@NotNull Location location,
@NotNull HeightMap heightMap)
Gets the highest block corresponding to the
HeightMap at the
given coordinates. |
default @NotNull Block |
World.getHighestBlockAt(@NotNull Location location,
HeightmapType heightmap)
Deprecated.
Upstream has added support for this, use
World.getHighestBlockAt(Location, HeightMap) |
int |
World.getHighestBlockYAt(@NotNull Location location)
Gets the highest non-empty (impassable) coordinate at the given
Location . |
int |
World.getHighestBlockYAt(@NotNull Location location,
@NotNull HeightMap heightMap)
|
default int |
World.getHighestBlockYAt(@NotNull Location location,
HeightmapType heightmap)
Deprecated.
Upstream has added support for this, use
World.getHighestBlockYAt(Location, HeightMap) |
@NotNull Collection<Entity> |
World.getNearbyEntities(@NotNull Location location,
double x,
double y,
double z)
Returns a list of entities within a bounding box centered around a
Location.
|
@NotNull Collection<Entity> |
World.getNearbyEntities(@NotNull Location location,
double x,
double y,
double z,
@Nullable Predicate<Entity> filter)
Returns a list of entities within a bounding box centered around a
Location.
|
default <T extends Entity> |
World.getNearbyEntitiesByType(@Nullable Class<? extends Entity> clazz,
@NotNull Location loc,
double xRadius,
double yRadius,
double zRadius,
@Nullable Predicate<T> predicate)
Gets all nearby entities of the specified type, within the specified radius (bounding box)
|
default <T extends Entity> |
World.getNearbyEntitiesByType(@Nullable Class<? extends T> clazz,
@NotNull Location loc,
double radius)
Gets all nearby entities of the specified type, within the specified radius (bounding box)
|
default <T extends Entity> |
World.getNearbyEntitiesByType(@Nullable Class<? extends T> clazz,
@NotNull Location loc,
double xzRadius,
double yRadius)
Gets all nearby entities of the specified type, within the specified radius, with x and x radius matching (bounding box)
|
default <T extends Entity> |
World.getNearbyEntitiesByType(@Nullable Class<? extends T> clazz,
@NotNull Location loc,
double xRadius,
double yRadius,
double zRadius)
Gets all nearby entities of the specified type, within the specified radius (bounding box)
|
default <T extends Entity> |
World.getNearbyEntitiesByType(@Nullable Class<? extends T> clazz,
@NotNull Location loc,
double xzRadius,
double yRadius,
@Nullable Predicate<T> predicate)
Gets all nearby entities of the specified type, within the specified radius, with x and x radius matching (bounding box)
|
default <T extends Entity> |
World.getNearbyEntitiesByType(@Nullable Class<? extends T> clazz,
@NotNull Location loc,
double radius,
@Nullable Predicate<T> predicate)
Gets all nearby entities of the specified type, within the specified radius (bounding box)
|
default @NotNull Collection<LivingEntity> |
World.getNearbyLivingEntities(@NotNull Location loc,
double radius)
Gets nearby players within the specified radius (bounding box)
|
default @NotNull Collection<LivingEntity> |
World.getNearbyLivingEntities(@NotNull Location loc,
double xzRadius,
double yRadius)
Gets nearby players within the specified radius (bounding box)
|
default @NotNull Collection<LivingEntity> |
World.getNearbyLivingEntities(@NotNull Location loc,
double xRadius,
double yRadius,
double zRadius)
Gets nearby players within the specified radius (bounding box)
|
default @NotNull Collection<LivingEntity> |
World.getNearbyLivingEntities(@NotNull Location loc,
double xRadius,
double yRadius,
double zRadius,
@Nullable Predicate<LivingEntity> predicate)
Gets nearby players within the specified radius (bounding box)
|
default @NotNull Collection<LivingEntity> |
World.getNearbyLivingEntities(@NotNull Location loc,
double xzRadius,
double yRadius,
@Nullable Predicate<LivingEntity> predicate)
Gets nearby players within the specified radius (bounding box)
|
default @NotNull Collection<LivingEntity> |
World.getNearbyLivingEntities(@NotNull Location loc,
double radius,
@Nullable Predicate<LivingEntity> predicate)
Gets nearby players within the specified radius (bounding box)
|
default @NotNull Collection<Player> |
World.getNearbyPlayers(@NotNull Location loc,
double radius)
Gets nearby players within the specified radius (bounding box)
|
default @NotNull Collection<Player> |
World.getNearbyPlayers(@NotNull Location loc,
double xzRadius,
double yRadius)
Gets nearby players within the specified radius (bounding box)
|
default @NotNull Collection<Player> |
World.getNearbyPlayers(@NotNull Location loc,
double xRadius,
double yRadius,
double zRadius)
Gets nearby players within the specified radius (bounding box)
|
default @NotNull Collection<Player> |
World.getNearbyPlayers(@NotNull Location loc,
double xRadius,
double yRadius,
double zRadius,
@Nullable Predicate<Player> predicate)
Gets nearby players within the specified radius (bounding box)
|
default @NotNull Collection<Player> |
World.getNearbyPlayers(@NotNull Location loc,
double xzRadius,
double yRadius,
@Nullable Predicate<Player> predicate)
Gets nearby players within the specified radius (bounding box)
|
default @NotNull Collection<Player> |
World.getNearbyPlayers(@NotNull Location loc,
double radius,
@Nullable Predicate<Player> predicate)
Gets nearby players within the specified radius (bounding box)
|
default boolean |
WorldBorder.isInBounds(@NotNull Location location)
Deprecated.
use
WorldBorder.isInside(Location) for an upstream compatible replacement |
boolean |
WorldBorder.isInside(@NotNull Location location)
Check if the specified location is inside this border.
|
@Nullable Location |
World.locateNearestBiome(@NotNull Location origin,
@NotNull Biome biome,
int radius)
Locates the nearest biome based on an origin, biome type, and radius to search.
|
@Nullable Location |
World.locateNearestBiome(@NotNull Location origin,
@NotNull Biome biome,
int radius,
int step)
Locates the nearest biome based on an origin, biome type, and radius to search
and step
|
@Nullable Raid |
World.locateNearestRaid(@NotNull Location location,
int radius)
Finds the nearest raid close to the given location.
|
@Nullable Location |
World.locateNearestStructure(@NotNull Location origin,
@NotNull StructureType structureType,
int radius,
boolean findUnexplored)
Find the closest nearby structure of a given
StructureType . |
void |
World.playEffect(@NotNull Location location,
@NotNull Effect effect,
int data)
Plays an effect to all players within a default radius around a given
location.
|
void |
World.playEffect(@NotNull Location location,
@NotNull Effect effect,
int data,
int radius)
Plays an effect to all players within a given radius around a location.
|
<T> void |
World.playEffect(@NotNull Location location,
@NotNull Effect effect,
T data)
Plays an effect to all players within a default radius around a given
location.
|
<T> void |
World.playEffect(@NotNull Location location,
@NotNull Effect effect,
T data,
int radius)
Plays an effect to all players within a given radius around a location.
|
void |
World.playSound(@NotNull Location location,
@NotNull Sound sound,
float volume,
float pitch)
Play a Sound at the provided Location in the World
|
void |
World.playSound(@NotNull Location location,
@NotNull Sound sound,
@NotNull SoundCategory category,
float volume,
float pitch)
Play a Sound at the provided Location in the World.
|
void |
World.playSound(@NotNull Location location,
@NotNull String sound,
float volume,
float pitch)
Play a Sound at the provided Location in the World.
|
void |
World.playSound(@NotNull Location location,
@NotNull String sound,
@NotNull SoundCategory category,
float volume,
float pitch)
Play a Sound at the provided Location in the World.
|
@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.
|
void |
WorldBorder.setCenter(@NotNull Location location)
Sets the new border center.
|
boolean |
World.setSpawnLocation(@NotNull Location location)
Sets the spawn location of the world.
|
<T extends Entity> |
World.spawn(@NotNull Location location,
@NotNull Class<T> clazz)
Spawn an entity of a specific class at the given
Location |
default <T extends Entity> |
World.spawn(@NotNull Location location,
@NotNull Class<T> clazz,
@Nullable 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. |
<T extends Entity> |
World.spawn(@NotNull Location location,
@NotNull Class<T> clazz,
@Nullable Consumer<T> function,
CreatureSpawnEvent.SpawnReason reason) |
default <T extends Entity> |
World.spawn(@NotNull Location location,
@NotNull Class<T> clazz,
CreatureSpawnEvent.SpawnReason reason) |
default <T extends Entity> |
World.spawn(@NotNull Location location,
@NotNull Class<T> clazz,
CreatureSpawnEvent.SpawnReason reason,
@Nullable Consumer<T> function) |
@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 Entity |
World.spawnEntity(@NotNull Location loc,
@NotNull EntityType type)
Creates a entity at the given
Location |
default @NotNull Entity |
World.spawnEntity(@NotNull Location loc,
@NotNull EntityType type,
CreatureSpawnEvent.SpawnReason reason) |
default @NotNull Entity |
World.spawnEntity(@NotNull Location loc,
@NotNull EntityType type,
CreatureSpawnEvent.SpawnReason reason,
@Nullable Consumer<Entity> function) |
@NotNull FallingBlock |
World.spawnFallingBlock(@NotNull Location location,
@NotNull BlockData data)
|
@NotNull FallingBlock |
World.spawnFallingBlock(@NotNull Location location,
@NotNull Material material,
byte data)
Deprecated.
Magic value
|
@NotNull FallingBlock |
World.spawnFallingBlock(@NotNull Location location,
@NotNull MaterialData data)
|
void |
World.spawnParticle(@NotNull Particle particle,
@NotNull Location location,
int count)
Spawns the particle (the number of times specified by count)
at the target location.
|
void |
World.spawnParticle(@NotNull Particle particle,
@NotNull Location location,
int count,
double offsetX,
double offsetY,
double offsetZ)
Spawns the particle (the number of times specified by count)
at the target location.
|
void |
World.spawnParticle(@NotNull Particle particle,
@NotNull Location location,
int count,
double offsetX,
double offsetY,
double offsetZ,
double extra)
Spawns the particle (the number of times specified by count)
at the target location.
|
<T> void |
World.spawnParticle(@NotNull Particle particle,
@NotNull Location location,
int count,
double offsetX,
double offsetY,
double offsetZ,
double extra,
T data)
Spawns the particle (the number of times specified by count)
at the target location.
|
<T> void |
World.spawnParticle(@NotNull Particle particle,
@NotNull Location location,
int count,
double offsetX,
double offsetY,
double offsetZ,
double extra,
T data,
boolean force)
Spawns the particle (the number of times specified by count)
at the target location.
|
<T> void |
World.spawnParticle(@NotNull Particle particle,
@NotNull Location location,
int count,
double offsetX,
double offsetY,
double offsetZ,
T data)
Spawns the particle (the number of times specified by count)
at the target location.
|
<T> void |
World.spawnParticle(@NotNull Particle particle,
@NotNull Location location,
int count,
T data)
Spawns the particle (the number of times specified by count)
at the target location.
|
@NotNull LightningStrike |
World.strikeLightning(@NotNull Location loc)
Strikes lightning at the given
Location |
@NotNull LightningStrike |
World.Spigot.strikeLightning(@NotNull Location loc,
boolean isSilent)
Strikes lightning at the given
Location and possibly without sound |
@NotNull LightningStrike |
World.strikeLightningEffect(@NotNull Location loc)
Strikes lightning at the given
Location without doing damage |
@NotNull LightningStrike |
World.Spigot.strikeLightningEffect(@NotNull Location loc,
boolean isSilent)
Strikes lightning at the given
Location without doing damage and possibly without sound |
@NotNull Location |
Location.subtract(@NotNull Location vec)
Subtracts the location by another.
|
@NotNull Location |
Location.subtract(@NotNull Location base,
double x,
double y,
double z)
Takes the x/y/z from base and subtracts the specified x/y/z to it and returns self
This mutates this object, clone first.
|
Modifier and Type | Method and Description |
---|---|
@Nullable Location |
EndGateway.getExitLocation()
Gets the location that entities are teleported to when
entering the gateway portal.
|
@Nullable Location |
Beehive.getFlower()
Get the hive's flower location.
|
@NotNull Location |
Block.getLocation()
Gets the Location of the block
|
@NotNull Location |
BlockState.getLocation()
Gets the location of this block state.
|
@NotNull Location |
DoubleChest.getLocation() |
@Nullable Location |
Block.getLocation(@Nullable Location loc)
Stores the location of the block in the provided Location object.
|
@Nullable Location |
BlockState.getLocation(@Nullable Location loc)
Stores the location of this block state in the provided Location object.
|
Modifier and Type | Method and Description |
---|---|
@Nullable Location |
Block.getLocation(@Nullable Location loc)
Stores the location of the block in the provided Location object.
|
@Nullable Location |
BlockState.getLocation(@Nullable Location loc)
Stores the location of this block state in the provided Location object.
|
@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.
|
void |
EndGateway.setExitLocation(@Nullable Location location)
Sets the exit location that entities are teleported to when
they enter the gateway portal.
|
void |
Beehive.setFlower(@Nullable Location location)
Set the hive's flower location.
|
Modifier and Type | Method and Description |
---|---|
@Nullable Location |
DragonBattle.getEndPortalLocation()
Get the location of the end portal.
|
Modifier and Type | Method and Description |
---|---|
@Nullable List<String> |
CommandMap.tabComplete(@NotNull CommandSender sender,
@NotNull String cmdLine,
@Nullable Location location)
Looks for the requested command and executes an appropriate
tab-completer if found.
|
@Nullable List<String> |
SimpleCommandMap.tabComplete(@NotNull CommandSender sender,
@NotNull String cmdLine,
@Nullable Location location) |
@NotNull List<String> |
Command.tabComplete(@NotNull CommandSender sender,
@NotNull String alias,
@NotNull String[] args,
@Nullable Location location)
Executed on tab completion for this command, returning a list of
options the player can tab through.
|
Modifier and Type | Method and Description |
---|---|
@Nullable Location |
ConfigurationSection.getLocation(@NotNull String path)
Gets the requested Location by path.
|
@Nullable Location |
MemorySection.getLocation(@NotNull String path) |
@Nullable Location |
ConfigurationSection.getLocation(@NotNull String path,
@Nullable Location def)
Gets the requested
Location by path, returning a default value if
not found. |
@Nullable Location |
MemorySection.getLocation(@NotNull String path,
@Nullable Location def) |
Modifier and Type | Method and Description |
---|---|
@Nullable Location |
ConfigurationSection.getLocation(@NotNull String path,
@Nullable Location def)
Gets the requested
Location by path, returning a default value if
not found. |
@Nullable Location |
MemorySection.getLocation(@NotNull String path,
@Nullable Location def) |
Modifier and Type | Method and Description |
---|---|
@Nullable Location |
EnderCrystal.getBeamTarget()
Gets the location that this end crystal is pointing its beam to.
|
@NotNull Location |
HumanEntity.getBedLocation()
Gets the location of the bed the player is currently sleeping in
|
@Nullable Location |
Player.getBedSpawnLocation()
Gets the Location where the player will spawn at their bed, null if
they have not slept in one or their current bed spawn is invalid.
|
@NotNull Location |
Player.getCompassTarget()
Get the previously set compass target.
|
@NotNull Location |
LivingEntity.getEyeLocation()
Get a Location detailing the current eye position of the living entity.
|
@Nullable Location |
Bee.getFlower()
Get the bee's flower location.
|
@Nullable Location |
Bee.getHive()
Get the bee's hive location.
|
@NotNull Location |
Turtle.getHome()
Get the turtle's home location
|
@NotNull Location |
Entity.getLocation() |
@Nullable Location |
Entity.getLocation(@Nullable Location loc)
Stores the entity's current position in the provided Location object.
|
@Nullable Location |
Entity.getOrigin()
Gets the location where this entity originates from.
|
@Nullable Location |
HumanEntity.getPotentialBedLocation()
Gets the Location of the player's bed, null if they have not slept
in one.
|
default Location |
FallingBlock.getSourceLoc()
Deprecated.
replaced by
Entity.getOrigin() |
default Location |
TNTPrimed.getSourceLoc()
Deprecated.
replaced by
Entity.getOrigin() |
@NotNull Location |
EnderSignal.getTargetLocation()
Get the location this EnderSignal is moving towards.
|
Modifier and Type | Method and Description |
---|---|
@Nullable Location |
Entity.getLocation(@Nullable Location loc)
Stores the entity's current position in the provided Location object.
|
@Nullable InventoryView |
HumanEntity.openAnvil(@Nullable Location location,
boolean force)
Opens an empty anvil inventory window with the player's inventory
on the bottom.
|
@Nullable InventoryView |
HumanEntity.openCartographyTable(@Nullable Location location,
boolean force)
Opens an empty cartography table inventory window with the player's inventory
on the bottom.
|
@Nullable InventoryView |
HumanEntity.openEnchanting(@Nullable Location location,
boolean force)
Opens an empty enchanting inventory window with the player's inventory
on the bottom.
|
@Nullable InventoryView |
HumanEntity.openGrindstone(@Nullable Location location,
boolean force)
Opens an empty grindstone inventory window with the player's inventory
on the bottom.
|
@Nullable InventoryView |
HumanEntity.openLoom(@Nullable Location location,
boolean force)
Opens an empty loom inventory window with the player's inventory
on the bottom.
|
@Nullable InventoryView |
HumanEntity.openSmithingTable(@Nullable Location location,
boolean force)
Opens an empty smithing table inventory window with the player's inventory
on the bottom.
|
@Nullable InventoryView |
HumanEntity.openStonecutter(@Nullable Location location,
boolean force)
Opens an empty stonecutter inventory window with the player's inventory
on the bottom.
|
@Nullable InventoryView |
HumanEntity.openWorkbench(@Nullable Location location,
boolean force)
Opens an empty workbench inventory window with the player's inventory
on the bottom.
|
void |
Player.playEffect(@NotNull Location loc,
@NotNull Effect effect,
int data)
Deprecated.
Magic value
|
<T> void |
Player.playEffect(@NotNull Location loc,
@NotNull Effect effect,
T data)
Plays an effect to just this player.
|
void |
Player.playNote(@NotNull Location loc,
byte instrument,
byte note)
Deprecated.
Magic value
|
void |
Player.playNote(@NotNull Location loc,
@NotNull Instrument instrument,
@NotNull Note note)
Play a note for a player at a location.
|
void |
Player.playSound(@NotNull Location location,
@NotNull Sound sound,
float volume,
float pitch)
Play a sound for a player at the location.
|
void |
Player.playSound(@NotNull Location location,
@NotNull Sound sound,
@NotNull SoundCategory category,
float volume,
float pitch)
Play a sound for a player at the location.
|
void |
Player.playSound(@NotNull Location location,
@NotNull String sound,
float volume,
float pitch)
Play a sound for a player at the location.
|
void |
Player.playSound(@NotNull Location location,
@NotNull String sound,
@NotNull SoundCategory category,
float volume,
float pitch)
Play a sound for a player at the location.
|
void |
Player.sendBlockChange(@NotNull Location loc,
@NotNull BlockData block)
Send a block change.
|
void |
Player.sendBlockChange(@NotNull Location loc,
@NotNull Material material,
byte data)
Deprecated.
Magic value
|
void |
Player.sendBlockDamage(@NotNull Location loc,
float progress)
Send block damage.
|
boolean |
Player.sendChunkChange(@NotNull Location loc,
int sx,
int sy,
int sz,
@NotNull byte[] data)
Deprecated.
Magic value
|
void |
Player.sendSignChange(@NotNull Location loc,
List<net.kyori.adventure.text.Component> lines)
Send a sign change.
|
void |
Player.sendSignChange(@NotNull Location loc,
List<net.kyori.adventure.text.Component> lines,
@NotNull DyeColor dyeColor)
Send a sign change.
|
void |
Player.sendSignChange(@NotNull Location loc,
@Nullable String[] lines)
Deprecated.
|
void |
Player.sendSignChange(@NotNull Location loc,
@Nullable String[] lines,
@NotNull DyeColor dyeColor)
Deprecated.
|
void |
EnderCrystal.setBeamTarget(@Nullable Location location)
Sets the location that this end crystal is pointing to.
|
void |
Player.setBedSpawnLocation(@Nullable Location location)
Sets the Location where the player will spawn at their bed.
|
void |
Player.setBedSpawnLocation(@Nullable Location location,
boolean force)
Sets the Location where the player will spawn at their bed.
|
void |
Player.setCompassTarget(@NotNull Location loc)
Set the target of the player's compass.
|
void |
Bee.setFlower(@Nullable Location location)
Set the bee's flower location.
|
void |
Bee.setHive(@Nullable Location location)
Set the bee's hive location.
|
void |
Turtle.setHome(@NotNull Location location)
Set the turtle's home location
|
void |
EnderSignal.setTargetLocation(@NotNull Location location)
Set the
Location this EnderSignal is moving towards. |
boolean |
Villager.sleep(@NotNull Location location)
Attempts to make this villager sleep at the given location.
|
boolean |
HumanEntity.sleep(@NotNull Location location,
boolean force)
Attempts to make the entity sleep at the given location.
|
void |
Player.spawnParticle(@NotNull Particle particle,
@NotNull Location location,
int count)
Spawns the particle (the number of times specified by count)
at the target location.
|
void |
Player.spawnParticle(@NotNull Particle particle,
@NotNull Location location,
int count,
double offsetX,
double offsetY,
double offsetZ)
Spawns the particle (the number of times specified by count)
at the target location.
|
void |
Player.spawnParticle(@NotNull Particle particle,
@NotNull Location location,
int count,
double offsetX,
double offsetY,
double offsetZ,
double extra)
Spawns the particle (the number of times specified by count)
at the target location.
|
<T> void |
Player.spawnParticle(@NotNull Particle particle,
@NotNull Location location,
int count,
double offsetX,
double offsetY,
double offsetZ,
double extra,
T data)
Spawns the particle (the number of times specified by count)
at the target location.
|
<T> void |
Player.spawnParticle(@NotNull Particle particle,
@NotNull Location location,
int count,
double offsetX,
double offsetY,
double offsetZ,
T data)
Spawns the particle (the number of times specified by count)
at the target location.
|
<T> void |
Player.spawnParticle(@NotNull Particle particle,
@NotNull Location location,
int count,
T data)
Spawns the particle (the number of times specified by count)
at the target location.
|
boolean |
Entity.teleport(@NotNull Location location)
Teleports this entity to the given location.
|
boolean |
Entity.teleport(@NotNull Location location,
@NotNull PlayerTeleportEvent.TeleportCause cause)
Teleports this entity to the given location.
|
default CompletableFuture<Boolean> |
Entity.teleportAsync(@NotNull Location loc)
Loads/Generates(in 1.13+) the Chunk asynchronously, and then teleports the entity when the chunk is ready.
|
default CompletableFuture<Boolean> |
Entity.teleportAsync(@NotNull Location loc,
@NotNull PlayerTeleportEvent.TeleportCause cause)
Loads/Generates(in 1.13+) the Chunk asynchronously, and then teleports the entity when the chunk is ready.
|
Modifier and Type | Field and Description |
---|---|
static MemoryKey<Location> |
MemoryKey.HOME |
static MemoryKey<Location> |
MemoryKey.JOB_SITE |
static MemoryKey<Location> |
MemoryKey.MEETING_POINT |
static MemoryKey<Location> |
MemoryKey.POTENTIAL_JOB_SITE |
Modifier and Type | Method and Description |
---|---|
@NotNull Location |
BlockPistonRetractEvent.getRetractLocation()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
@NotNull Location |
EntityTeleportEvent.getFrom()
Gets the location that this entity moved from
|
@NotNull Location |
EntityPortalEnterEvent.getLocation()
Gets the portal block the entity is touching
|
@NotNull Location |
ItemDespawnEvent.getLocation()
Gets the location at which the item is despawning.
|
@NotNull Location |
EntitySpawnEvent.getLocation()
Gets the location at which the entity is spawning.
|
@NotNull Location |
EntityExplodeEvent.getLocation()
Returns the location where the explosion happened.
|
@Nullable Location |
EntityTeleportEvent.getTo()
Gets the location that this entity moved to
|
Modifier and Type | Method and Description |
---|---|
void |
EntityTeleportEvent.setFrom(@NotNull Location from)
Sets the location that this entity moved from
|
void |
EntityTeleportEvent.setTo(@Nullable Location to)
Sets the location that this entity moved to
|
Modifier and Type | Method and Description |
---|---|
@NotNull Location |
PlayerMoveEvent.getFrom()
Gets the location this player moved from
|
@Nullable Location |
PlayerInteractEvent.getInteractionPoint()
The exact point at which the interaction occurred.
|
@NotNull Location |
PlayerRespawnEvent.getRespawnLocation()
Gets the current respawn location
|
@NotNull Location |
PlayerMoveEvent.getTo()
Gets the location this player moved to
|
Modifier and Type | Method and Description |
---|---|
void |
PlayerMoveEvent.setFrom(@NotNull Location from)
Sets the location to mark as where the player moved from
|
void |
PlayerRespawnEvent.setRespawnLocation(@NotNull Location respawnLocation)
Sets the new respawn location
|
void |
PlayerMoveEvent.setTo(@NotNull Location to)
Sets the location that this player will move to
|
Modifier and Type | Method and Description |
---|---|
Location |
TabCompleteEvent.getLocation() |
Constructor and Description |
---|
TabCompleteEvent(@NotNull CommandSender sender,
@NotNull String buffer,
@NotNull List<String> completions,
boolean isCommand,
Location location) |
Modifier and Type | Method and Description |
---|---|
@NotNull Location |
VehicleMoveEvent.getFrom()
Get the previous position.
|
@NotNull Location |
VehicleMoveEvent.getTo()
Get the next position.
|
Constructor and Description |
---|
VehicleMoveEvent(@NotNull Vehicle vehicle,
@NotNull Location from,
@NotNull Location to) |
VehicleMoveEvent(@NotNull Vehicle vehicle,
@NotNull Location from,
@NotNull Location to) |
Modifier and Type | Method and Description |
---|---|
@NotNull Location |
StructureGrowEvent.getLocation()
Gets the location of the structure.
|
@NotNull Location |
SpawnChangeEvent.getPreviousLocation()
Gets the previous spawn location
|
Constructor and Description |
---|
SpawnChangeEvent(@NotNull World world,
@NotNull Location previousLocation) |
StructureGrowEvent(@NotNull Location location,
@NotNull TreeType species,
boolean bonemeal,
@Nullable Player player,
@NotNull List<BlockState> blocks) |
Modifier and Type | Method and Description |
---|---|
@Nullable Location |
ChunkGenerator.getFixedSpawnLocation(@NotNull World world,
@NotNull Random random)
Gets a fixed spawn location to use for a given world.
|
Modifier and Type | Method and Description |
---|---|
@Nullable Location |
Inventory.getLocation()
Get the location of the block or entity which corresponds to this inventory.
|
Modifier and Type | Method and Description |
---|---|
@Nullable Location |
CompassMeta.getLodestone()
Gets the location that this compass will point to.
|
Modifier and Type | Method and Description |
---|---|
void |
CompassMeta.setLodestone(@Nullable Location lodestone)
Sets the location this lodestone compass will point to.
|
Modifier and Type | Method and Description |
---|---|
@NotNull Location |
LootContext.getLocation()
The
Location to store where the loot will be generated. |
Constructor and Description |
---|
Builder(@NotNull Location location)
Creates a new LootContext.Builder instance to facilitate easy
creation of
LootContext s. |
Modifier and Type | Method and Description |
---|---|
@NotNull Location |
Vector.toLocation(@NotNull World world)
Gets a Location version of this vector with yaw and pitch being 0.
|
@NotNull Location |
Vector.toLocation(@NotNull World world,
float yaw,
float pitch)
Gets a Location version of this vector.
|
Modifier and Type | Method and Description |
---|---|
static @NotNull BoundingBox |
BoundingBox.of(@NotNull Location center,
double x,
double y,
double z)
Creates a new bounding box using the given center and extents.
|
static @NotNull BoundingBox |
BoundingBox.of(@NotNull Location corner1,
@NotNull Location corner2)
Creates a new bounding box using the coordinates of the given locations
as corners.
|
static @NotNull BoundingBox |
BoundingBox.of(@NotNull Location corner1,
@NotNull Location corner2)
Creates a new bounding box using the coordinates of the given locations
as corners.
|
@NotNull BoundingBox |
BoundingBox.shift(@NotNull Location shift)
Shifts this bounding box by the given amounts.
|
@NotNull BoundingBox |
BoundingBox.union(@NotNull Location position)
Expands this bounding box to contain (or border) the specified position.
|
Constructor and Description |
---|
BlockIterator(@NotNull Location loc)
Constructs the BlockIterator.
|
BlockIterator(@NotNull Location loc,
double yOffset)
Constructs the BlockIterator.
|
BlockIterator(@NotNull Location loc,
double yOffset,
int maxDistance)
Constructs the BlockIterator.
|
Modifier and Type | Method and Description |
---|---|
@NotNull Location |
PlayerSpawnLocationEvent.getSpawnLocation()
Gets player's spawn location.
|
Modifier and Type | Method and Description |
---|---|
void |
PlayerSpawnLocationEvent.setSpawnLocation(@NotNull Location location)
Sets player's spawn location.
|
Constructor and Description |
---|
PlayerSpawnLocationEvent(@NotNull Player who,
@NotNull Location spawnLocation) |
Copyright © 2021. All rights reserved.