Package | Description |
---|---|
com.destroystokyo.paper | |
com.destroystokyo.paper.entity | |
com.destroystokyo.paper.event.entity | |
com.destroystokyo.paper.event.player | |
com.destroystokyo.paper.event.server | |
org.bukkit |
More generalized classes in the API.
|
org.bukkit.block |
Classes used to manipulate the voxels in a
world ,
including special states. |
org.bukkit.command |
Classes relating to handling specialized non-chat player input.
|
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.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.loot | |
org.bukkit.util |
Multi and single purpose classes to facilitate various programmatic
concepts.
|
org.spigotmc.event.player |
Modifier and Type | Method | Description |
---|---|---|
Location |
ParticleBuilder.location() |
Modifier and Type | Method | Description |
---|---|---|
ParticleBuilder |
ParticleBuilder.location(Location location) |
Sets the location of where to spawn the particle
|
Modifier and Type | Method | Description |
---|---|---|
Location |
Pathfinder.PathResult.getFinalPoint() |
|
Location |
Pathfinder.PathResult.getNextPoint() |
Modifier and Type | Method | Description |
---|---|---|
List<Location> |
Pathfinder.PathResult.getPoints() |
All currently calculated points to follow along the path to reach the destination location
Will return points the entity has already moved past, see
Pathfinder.PathResult.getNextPointIndex() |
Modifier and Type | Method | Description |
---|---|---|
Pathfinder.PathResult |
Pathfinder.findPath(Location loc) |
Calculates a destination for the Entity to navigate to, but does not set it
as the current target.
|
default boolean |
Pathfinder.moveTo(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(Location loc,
double speed) |
Calculates a destination for the Entity to navigate to, with desired speed
as the current target.
|
Modifier and Type | Method | Description |
---|---|---|
Location |
EntityPathfindEvent.getLoc() |
The Location of where the entity is about to move to.
|
Location |
TurtleLayEggEvent.getLocation() |
Get the location where the eggs are being laid
|
Location |
TurtleStartDiggingEvent.getLocation() |
Get the location where the turtle is digging
|
Location |
PreSpawnerSpawnEvent.getSpawnerLocation() |
|
Location |
PreCreatureSpawnEvent.getSpawnLocation() |
Constructor | Description |
---|---|
EntityPathfindEvent(Entity entity,
Location loc,
Entity targetEntity) |
|
EntityTeleportEndGatewayEvent(Entity what,
Location from,
Location to,
EndGateway gateway) |
|
PhantomPreSpawnEvent(Location location,
Entity entity,
CreatureSpawnEvent.SpawnReason reason) |
|
PreCreatureSpawnEvent(Location location,
EntityType type,
CreatureSpawnEvent.SpawnReason reason) |
|
PreSpawnerSpawnEvent(Location location,
EntityType type,
Location spawnerLocation) |
|
TurtleLayEggEvent(Turtle turtle,
Location location,
int eggCount) |
|
TurtleStartDiggingEvent(Turtle turtle,
Location location) |
Modifier and Type | Method | Description |
---|---|---|
Location |
PlayerJumpEvent.getFrom() |
Gets the location this player jumped from
|
Location |
PlayerPostRespawnEvent.getRespawnedLocation() |
Returns the location of the respawned player
|
Location |
PlayerInitialSpawnEvent.getSpawnLocation() |
Gets the current spawn location
|
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 | Description |
---|---|---|
void |
PlayerJumpEvent.setFrom(Location from) |
Sets the location to mark as where the player jumped from
|
void |
PlayerInitialSpawnEvent.setSpawnLocation(Location spawnLocation) |
Sets the new spawn location
|
Constructor | Description |
---|---|
PlayerInitialSpawnEvent(Player player,
Location spawnLocation) |
|
PlayerJumpEvent(Player player,
Location from,
Location to) |
|
PlayerPostRespawnEvent(Player respawnPlayer,
Location respawnedLocation,
boolean isBedSpawn) |
|
PlayerTeleportEndGatewayEvent(Player player,
Location from,
Location to,
EndGateway gateway) |
Modifier and Type | Method | Description |
---|---|---|
Location |
AsyncTabCompleteEvent.getLocation() |
Constructor | Description |
---|---|
AsyncTabCompleteEvent(CommandSender sender,
List<String> completions,
String buffer,
boolean isCommand,
Location loc) |
Modifier and Type | Method | Description |
---|---|---|
Location |
Location.add(double x,
double y,
double z) |
Adds the location by another.
|
Location |
Location.add(Location vec) |
Adds the location by another.
|
Location |
Location.add(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.
|
Location |
Location.add(Vector vec) |
Adds the location by a vector.
|
Location |
Location.clone() |
|
static Location |
Location.deserialize(Map<String,Object> args) |
Required method for deserialization
|
Location |
TravelAgent.findOrCreate(Location location) |
Attempt to find a portal near the given location, if a portal is not
found it will attempt to create one.
|
Location |
TravelAgent.findPortal(Location location) |
Attempt to find a portal near the given location.
|
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.
|
Location |
WorldBorder.getCenter() |
Gets the current border center.
|
default Location |
World.getLocationAtKey(long key) |
Gets the
Location at the given block key |
Location |
World.getSpawnLocation() |
Gets the default spawn
Location of this world |
Location |
World.locateNearestStructure(Location origin,
StructureType structureType,
int radius,
boolean findUnexplored) |
Find the closest nearby structure of a given
StructureType . |
Location |
Location.multiply(double m) |
Performs scalar multiplication, multiplying all components with a
scalar.
|
Location |
Location.set(double x,
double y,
double z) |
Sets the position of this Location and returns itself
This mutates this object, clone first.
|
Location |
Location.setDirection(Vector vector) |
|
Location |
Location.subtract(double x,
double y,
double z) |
Subtracts the location by another.
|
Location |
Location.subtract(Location vec) |
Subtracts the location by another.
|
Location |
Location.subtract(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.
|
Location |
Location.subtract(Vector vec) |
Subtracts the location by a vector.
|
Location |
Location.toBlockLocation() |
|
Location |
Location.toCenterLocation() |
|
Location |
Location.toHighestLocation() |
Returns a copy of this location except with y = getWorld().getHighestBlockYAt(this.getBlockX(), this.getBlockZ())
|
Location |
Location.toHighestLocation(HeightmapType heightmap) |
Returns a copy of this location except with y = getWorld().getHighestBlockYAt(this.getBlockX(), this.getBlockZ(), heightmap)
|
Location |
Location.zero() |
Zero this location's components.
|
Modifier and Type | Method | Description |
---|---|---|
Location |
Location.add(Location vec) |
Adds the location by another.
|
Location |
Location.add(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 ItemStack |
Bukkit.createExplorerMap(World world,
Location location,
StructureType structureType) |
Create a new explorer map targeting the closest nearby structure of a
given
StructureType . |
static ItemStack |
Bukkit.createExplorerMap(World world,
Location location,
StructureType structureType,
int radius,
boolean findUnexplored) |
Create a new explorer map targeting the closest nearby structure of a
given
StructureType . |
ItemStack |
Server.createExplorerMap(World world,
Location location,
StructureType structureType) |
Create a new explorer map targeting the closest nearby structure of a
given
StructureType . |
ItemStack |
Server.createExplorerMap(World world,
Location location,
StructureType structureType,
int radius,
boolean findUnexplored) |
Create a new explorer map targeting the closest nearby structure of a
given
StructureType . |
default boolean |
World.createExplosion(Entity source,
Location loc,
float power) |
Creates explosion at given location with given power, with the specified entity as the source.
|
default boolean |
World.createExplosion(Entity source,
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(Entity source,
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(Location loc,
float power) |
Creates explosion at given coordinates with given power
|
boolean |
World.createExplosion(Location loc,
float power,
boolean setFire) |
Creates explosion at given coordinates with given power and optionally
setting blocks on fire.
|
default boolean |
World.createExplosion(Location loc,
float power,
boolean setFire,
boolean breakBlocks) |
Creates explosion at given location with given power and optionally
setting blocks on fire or breaking blocks.
|
boolean |
TravelAgent.createPortal(Location location) |
Attempt to create a portal near the given location.
|
double |
Location.distance(Location o) |
Get the distance between this location and another.
|
double |
Location.distanceSquared(Location o) |
Get the squared distance between this location and another.
|
Item |
World.dropItem(Location location,
ItemStack item) |
Drops an item at the specified
Location |
Item |
World.dropItemNaturally(Location location,
ItemStack item) |
Drops an item at the specified
Location with a random offset |
Location |
TravelAgent.findOrCreate(Location location) |
Attempt to find a portal near the given location, if a portal is not
found it will attempt to create one.
|
Location |
TravelAgent.findPortal(Location location) |
Attempt to find a portal near the given location.
|
boolean |
World.generateTree(Location location,
TreeType type) |
Creates a tree at the given
Location |
boolean |
World.generateTree(Location loc,
TreeType type,
BlockChangeDelegate delegate) |
Creates a tree at the given
Location |
Block |
World.getBlockAt(Location location) |
|
Chunk |
World.getChunkAt(Location location) |
|
default CompletableFuture<Chunk> |
World.getChunkAtAsync(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(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(Location loc,
boolean gen,
Consumer<Chunk> cb) |
|
default void |
World.getChunkAtAsync(Location loc,
Consumer<Chunk> cb) |
|
default void |
World.getChunkAtAsync(Location loc,
World.ChunkLoadCallback cb) |
Deprecated.
Use either the Future or the Consumer based methods
|
static long |
Chunk.getChunkKey(Location loc) |
|
Block |
World.getHighestBlockAt(Location location) |
Gets the lowest block at the given
Location such that the block
and all blocks above it are transparent for lighting purposes. |
default Block |
World.getHighestBlockAt(Location location,
HeightmapType heightmap) |
Returns the highest
Block at the specified block coordinates that match the specified heightmap's conditions. |
int |
World.getHighestBlockYAt(Location location) |
Gets the y coordinate of the lowest block at the given
Location
such that the block and all blocks above it are transparent for lighting
purposes. |
default int |
World.getHighestBlockYAt(Location location,
HeightmapType heightmap) |
Returns the highest block's y-coordinate at the specified block coordinates that match the specified heightmap's conditions.
|
Collection<Entity> |
World.getNearbyEntities(Location location,
double x,
double y,
double z) |
Returns a list of entities within a bounding box centered around a
Location.
|
Collection<Entity> |
World.getNearbyEntities(Location location,
double x,
double y,
double z,
Predicate<Entity> filter) |
Returns a list of entities within a bounding box centered around a
Location.
|
default <T extends Entity> |
World.getNearbyEntitiesByType(Class<? extends Entity> clazz,
Location loc,
double xRadius,
double yRadius,
double zRadius,
Predicate<T> predicate) |
Gets all nearby entities of the specified type, within the specified radius (bounding box)
|
default <T extends Entity> |
World.getNearbyEntitiesByType(Class<? extends T> clazz,
Location loc,
double radius) |
Gets all nearby entities of the specified type, within the specified radius (bounding box)
|
default <T extends Entity> |
World.getNearbyEntitiesByType(Class<? extends T> clazz,
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(Class<? extends T> clazz,
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(Class<? extends T> clazz,
Location loc,
double xzRadius,
double yRadius,
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(Class<? extends T> clazz,
Location loc,
double radius,
Predicate<T> predicate) |
Gets all nearby entities of the specified type, within the specified radius (bounding box)
|
default Collection<LivingEntity> |
World.getNearbyLivingEntities(Location loc,
double radius) |
Gets nearby players within the specified radius (bounding box)
|
default Collection<LivingEntity> |
World.getNearbyLivingEntities(Location loc,
double xzRadius,
double yRadius) |
Gets nearby players within the specified radius (bounding box)
|
default Collection<LivingEntity> |
World.getNearbyLivingEntities(Location loc,
double xRadius,
double yRadius,
double zRadius) |
Gets nearby players within the specified radius (bounding box)
|
default Collection<LivingEntity> |
World.getNearbyLivingEntities(Location loc,
double xRadius,
double yRadius,
double zRadius,
Predicate<LivingEntity> predicate) |
Gets nearby players within the specified radius (bounding box)
|
default Collection<LivingEntity> |
World.getNearbyLivingEntities(Location loc,
double xzRadius,
double yRadius,
Predicate<LivingEntity> predicate) |
Gets nearby players within the specified radius (bounding box)
|
default Collection<LivingEntity> |
World.getNearbyLivingEntities(Location loc,
double radius,
Predicate<LivingEntity> predicate) |
Gets nearby players within the specified radius (bounding box)
|
default Collection<Player> |
World.getNearbyPlayers(Location loc,
double radius) |
Gets nearby players within the specified radius (bounding box)
|
default Collection<Player> |
World.getNearbyPlayers(Location loc,
double xzRadius,
double yRadius) |
Gets nearby players within the specified radius (bounding box)
|
default Collection<Player> |
World.getNearbyPlayers(Location loc,
double xRadius,
double yRadius,
double zRadius) |
Gets nearby players within the specified radius (bounding box)
|
default Collection<Player> |
World.getNearbyPlayers(Location loc,
double xRadius,
double yRadius,
double zRadius,
Predicate<Player> predicate) |
Gets nearby players within the specified radius (bounding box)
|
default Collection<Player> |
World.getNearbyPlayers(Location loc,
double xzRadius,
double yRadius,
Predicate<Player> predicate) |
Gets nearby players within the specified radius (bounding box)
|
default Collection<Player> |
World.getNearbyPlayers(Location loc,
double radius,
Predicate<Player> predicate) |
Gets nearby players within the specified radius (bounding box)
|
default boolean |
WorldBorder.isInBounds(Location location) |
Deprecated.
use
WorldBorder.isInside(Location) for an upstream compatible replacement |
boolean |
WorldBorder.isInside(Location location) |
Check if the specified location is inside this border.
|
Location |
World.locateNearestStructure(Location origin,
StructureType structureType,
int radius,
boolean findUnexplored) |
Find the closest nearby structure of a given
StructureType . |
void |
World.playEffect(Location location,
Effect effect,
int data) |
Plays an effect to all players within a default radius around a given
location.
|
void |
World.playEffect(Location location,
Effect effect,
int data,
int radius) |
Plays an effect to all players within a given radius around a location.
|
<T> void |
World.playEffect(Location location,
Effect effect,
T data) |
Plays an effect to all players within a default radius around a given
location.
|
<T> void |
World.playEffect(Location location,
Effect effect,
T data,
int radius) |
Plays an effect to all players within a given radius around a location.
|
void |
World.playSound(Location location,
String sound,
float volume,
float pitch) |
Play a Sound at the provided Location in the World.
|
void |
World.playSound(Location location,
String sound,
SoundCategory category,
float volume,
float pitch) |
Play a Sound at the provided Location in the World.
|
void |
World.playSound(Location location,
Sound sound,
float volume,
float pitch) |
Play a Sound at the provided Location in the World
|
void |
World.playSound(Location location,
Sound sound,
SoundCategory category,
float volume,
float pitch) |
Play a Sound at the provided Location in the World.
|
RayTraceResult |
World.rayTrace(Location start,
Vector direction,
double maxDistance,
FluidCollisionMode fluidCollisionMode,
boolean ignorePassableBlocks,
double raySize,
Predicate<Entity> filter) |
Performs a ray trace that checks for both block and entity collisions.
|
RayTraceResult |
World.rayTraceBlocks(Location start,
Vector direction,
double maxDistance) |
Performs a ray trace that checks for block collisions using the blocks'
precise collision shapes.
|
RayTraceResult |
World.rayTraceBlocks(Location start,
Vector direction,
double maxDistance,
FluidCollisionMode fluidCollisionMode) |
Performs a ray trace that checks for block collisions using the blocks'
precise collision shapes.
|
RayTraceResult |
World.rayTraceBlocks(Location start,
Vector direction,
double maxDistance,
FluidCollisionMode fluidCollisionMode,
boolean ignorePassableBlocks) |
Performs a ray trace that checks for block collisions using the blocks'
precise collision shapes.
|
RayTraceResult |
World.rayTraceEntities(Location start,
Vector direction,
double maxDistance) |
Performs a ray trace that checks for entity collisions.
|
RayTraceResult |
World.rayTraceEntities(Location start,
Vector direction,
double maxDistance,
double raySize) |
Performs a ray trace that checks for entity collisions.
|
RayTraceResult |
World.rayTraceEntities(Location start,
Vector direction,
double maxDistance,
double raySize,
Predicate<Entity> filter) |
Performs a ray trace that checks for entity collisions.
|
RayTraceResult |
World.rayTraceEntities(Location start,
Vector direction,
double maxDistance,
Predicate<Entity> filter) |
Performs a ray trace that checks for entity collisions.
|
void |
WorldBorder.setCenter(Location location) |
Sets the new border center.
|
boolean |
World.setSpawnLocation(Location location) |
Sets the spawn location of the world.
|
<T extends Entity> |
World.spawn(Location location,
Class<T> clazz) |
Spawn an entity of a specific class at the given
Location |
<T extends Entity> |
World.spawn(Location location,
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. |
Arrow |
World.spawnArrow(Location location,
Vector direction,
float speed,
float spread) |
|
<T extends Arrow> |
World.spawnArrow(Location location,
Vector direction,
float speed,
float spread,
Class<T> clazz) |
Creates an arrow entity of the given class at the given
Location |
Entity |
World.spawnEntity(Location loc,
EntityType type) |
Creates a entity at the given
Location |
FallingBlock |
World.spawnFallingBlock(Location location,
BlockData data) |
|
FallingBlock |
World.spawnFallingBlock(Location location,
MaterialData data) |
|
FallingBlock |
World.spawnFallingBlock(Location location,
Material material,
byte data) |
Deprecated.
Magic value
|
void |
World.spawnParticle(Particle particle,
Location location,
int count) |
Spawns the particle (the number of times specified by count)
at the target location.
|
void |
World.spawnParticle(Particle particle,
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(Particle particle,
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(Particle particle,
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(Particle particle,
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(Particle particle,
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(Particle particle,
Location location,
int count,
T data) |
Spawns the particle (the number of times specified by count)
at the target location.
|
LightningStrike |
World.Spigot.strikeLightning(Location loc,
boolean isSilent) |
Strikes lightning at the given
Location and possibly without sound |
LightningStrike |
World.strikeLightning(Location loc) |
Strikes lightning at the given
Location |
LightningStrike |
World.Spigot.strikeLightningEffect(Location loc,
boolean isSilent) |
Strikes lightning at the given
Location without doing damage and possibly without sound |
LightningStrike |
World.strikeLightningEffect(Location loc) |
Strikes lightning at the given
Location without doing damage |
Location |
Location.subtract(Location vec) |
Subtracts the location by another.
|
Location |
Location.subtract(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 | Description |
---|---|---|
Location |
EndGateway.getExitLocation() |
Gets the location that entities are teleported to when
entering the gateway portal.
|
Location |
Block.getLocation() |
Gets the Location of the block
|
Location |
Block.getLocation(Location loc) |
Stores the location of the block in the provided Location object.
|
Location |
BlockState.getLocation() |
Gets the location of this block state.
|
Location |
BlockState.getLocation(Location loc) |
Stores the location of this block state in the provided Location object.
|
Location |
DoubleChest.getLocation() |
Modifier and Type | Method | Description |
---|---|---|
Location |
Block.getLocation(Location loc) |
Stores the location of the block in the provided Location object.
|
Location |
BlockState.getLocation(Location loc) |
Stores the location of this block state in the provided Location object.
|
RayTraceResult |
Block.rayTrace(Location start,
Vector direction,
double maxDistance,
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(Location location) |
Sets the exit location that entities are teleported to when
they enter the gateway portal.
|
Modifier and Type | Method | Description |
---|---|---|
List<String> |
Command.tabComplete(CommandSender sender,
String alias,
String[] args,
Location location) |
Executed on tab completion for this command, returning a list of
options the player can tab through.
|
List<String> |
CommandMap.tabComplete(CommandSender sender,
String cmdLine,
Location location) |
Looks for the requested command and executes an appropriate
tab-completer if found.
|
List<String> |
SimpleCommandMap.tabComplete(CommandSender sender,
String cmdLine,
Location location) |
Modifier and Type | Method | Description |
---|---|---|
Location |
EnderCrystal.getBeamTarget() |
Gets the location that this end crystal is pointing its beam to.
|
Location |
HumanEntity.getBedLocation() |
Gets the location of the bed the player is currently sleeping in
|
Location |
HumanEntity.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.
|
Location |
Player.getCompassTarget() |
Get the previously set compass target.
|
Location |
LivingEntity.getEyeLocation() |
Get a Location detailing the current eye position of the living entity.
|
Location |
Turtle.getHome() |
Get the turtle's home location
|
Location |
Entity.getLocation() |
Gets the entity's current position
|
Location |
Entity.getLocation(Location loc) |
Stores the entity's current position in the provided Location object.
|
Location |
Entity.getOrigin() |
Gets the location where this entity originates from.
|
default Location |
FallingBlock.getSourceLoc() |
Deprecated.
replaced by
Entity.getOrigin() |
default Location |
TNTPrimed.getSourceLoc() |
Deprecated.
replaced by
Entity.getOrigin() |
Location |
EnderSignal.getTargetLocation() |
Get the location this EnderSignal is moving towards.
|
Modifier and Type | Method | Description |
---|---|---|
Location |
Entity.getLocation(Location loc) |
Stores the entity's current position in the provided Location object.
|
InventoryView |
HumanEntity.openEnchanting(Location location,
boolean force) |
Opens an empty enchanting inventory window with the player's inventory
on the bottom.
|
InventoryView |
HumanEntity.openWorkbench(Location location,
boolean force) |
Opens an empty workbench inventory window with the player's inventory
on the bottom.
|
void |
Player.playEffect(Location loc,
Effect effect,
int data) |
Deprecated.
Magic value
|
<T> void |
Player.playEffect(Location loc,
Effect effect,
T data) |
Plays an effect to just this player.
|
void |
Player.playNote(Location loc,
byte instrument,
byte note) |
Deprecated.
Magic value
|
void |
Player.playNote(Location loc,
Instrument instrument,
Note note) |
Play a note for a player at a location.
|
void |
Player.playSound(Location location,
String sound,
float volume,
float pitch) |
Play a sound for a player at the location.
|
void |
Player.playSound(Location location,
String sound,
SoundCategory category,
float volume,
float pitch) |
Play a sound for a player at the location.
|
void |
Player.playSound(Location location,
Sound sound,
float volume,
float pitch) |
Play a sound for a player at the location.
|
void |
Player.playSound(Location location,
Sound sound,
SoundCategory category,
float volume,
float pitch) |
Play a sound for a player at the location.
|
void |
Player.sendBlockChange(Location loc,
BlockData block) |
Send a block change.
|
void |
Player.sendBlockChange(Location loc,
Material material,
byte data) |
Deprecated.
Magic value
|
boolean |
Player.sendChunkChange(Location loc,
int sx,
int sy,
int sz,
byte[] data) |
Deprecated.
Magic value
|
void |
Player.sendSignChange(Location loc,
String[] lines) |
Send a sign change.
|
void |
EnderCrystal.setBeamTarget(Location location) |
Sets the location that this end crystal is pointing to.
|
void |
HumanEntity.setBedSpawnLocation(Location location) |
Sets the Location where the player will spawn at their bed.
|
void |
HumanEntity.setBedSpawnLocation(Location location,
boolean force) |
Sets the Location where the player will spawn at their bed.
|
void |
Player.setCompassTarget(Location loc) |
Set the target of the player's compass.
|
void |
Turtle.setHome(Location location) |
Set the turtle's home location
|
void |
EnderSignal.setTargetLocation(Location location) |
Set the
Location this EnderSignal is moving towards. |
boolean |
HumanEntity.sleep(Location location,
boolean force) |
Attempts to make the entity sleep at the given location.
|
void |
Player.spawnParticle(Particle particle,
Location location,
int count) |
Spawns the particle (the number of times specified by count)
at the target location.
|
void |
Player.spawnParticle(Particle particle,
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(Particle particle,
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(Particle particle,
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(Particle particle,
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(Particle particle,
Location location,
int count,
T data) |
Spawns the particle (the number of times specified by count)
at the target location.
|
boolean |
Entity.teleport(Location location) |
Teleports this entity to the given location.
|
boolean |
Entity.teleport(Location location,
PlayerTeleportEvent.TeleportCause cause) |
Teleports this entity to the given location.
|
default CompletableFuture<Boolean> |
Entity.teleportAsync(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(Location loc,
PlayerTeleportEvent.TeleportCause cause) |
Loads/Generates(in 1.13+) the Chunk asynchronously, and then teleports the entity when the chunk is ready.
|
Modifier and Type | Method | Description |
---|---|---|
Location |
BlockPistonRetractEvent.getRetractLocation() |
Deprecated.
|
Modifier and Type | Method | Description |
---|---|---|
Location |
EntityTeleportEvent.getFrom() |
Gets the location that this entity moved from
|
Location |
EntityExplodeEvent.getLocation() |
Returns the location where the explosion happened.
|
Location |
EntityPortalEnterEvent.getLocation() |
Gets the portal block the entity is touching
|
Location |
EntitySpawnEvent.getLocation() |
Gets the location at which the entity is spawning.
|
Location |
ItemDespawnEvent.getLocation() |
Gets the location at which the item is despawning.
|
Location |
EntityTeleportEvent.getTo() |
Gets the location that this entity moved to
|
Modifier and Type | Method | Description |
---|---|---|
void |
EntityTeleportEvent.setFrom(Location from) |
Sets the location that this entity moved from
|
void |
EntityTeleportEvent.setTo(Location to) |
Sets the location that this entity moved to
|
Constructor | Description |
---|---|
EntityExplodeEvent(Entity what,
Location location,
List<Block> blocks,
float yield) |
|
EntityPortalEnterEvent(Entity entity,
Location location) |
|
EntityPortalEvent(Entity entity,
Location from,
Location to,
TravelAgent pta) |
|
EntityPortalExitEvent(Entity entity,
Location from,
Location to,
Vector before,
Vector after) |
|
EntityTeleportEvent(Entity what,
Location from,
Location to) |
|
ItemDespawnEvent(Item despawnee,
Location loc) |
|
ItemSpawnEvent(Item spawnee,
Location loc) |
Deprecated.
|
Modifier and Type | Method | Description |
---|---|---|
Location |
PlayerMoveEvent.getFrom() |
Gets the location this player moved from
|
Location |
PlayerRespawnEvent.getRespawnLocation() |
Gets the current respawn location
|
Location |
PlayerMoveEvent.getTo() |
Gets the location this player moved to
|
Modifier and Type | Method | Description |
---|---|---|
void |
PlayerMoveEvent.setFrom(Location from) |
Sets the location to mark as where the player moved from
|
void |
PlayerRespawnEvent.setRespawnLocation(Location respawnLocation) |
Sets the new respawn location
|
void |
PlayerMoveEvent.setTo(Location to) |
Sets the location that this player will move to
|
Constructor | Description |
---|---|
PlayerMoveEvent(Player player,
Location from,
Location to) |
|
PlayerPortalEvent(Player player,
Location from,
Location to,
TravelAgent pta) |
|
PlayerPortalEvent(Player player,
Location from,
Location to,
TravelAgent pta,
PlayerTeleportEvent.TeleportCause cause) |
|
PlayerRespawnEvent(Player respawnPlayer,
Location respawnLocation,
boolean isBedSpawn) |
|
PlayerTeleportEvent(Player player,
Location from,
Location to) |
|
PlayerTeleportEvent(Player player,
Location from,
Location to,
PlayerTeleportEvent.TeleportCause cause) |
Modifier and Type | Method | Description |
---|---|---|
Location |
TabCompleteEvent.getLocation() |
Constructor | Description |
---|---|
TabCompleteEvent(CommandSender sender,
String buffer,
List<String> completions,
boolean isCommand,
Location location) |
Modifier and Type | Method | Description |
---|---|---|
Location |
VehicleMoveEvent.getFrom() |
Get the previous position.
|
Location |
VehicleMoveEvent.getTo() |
Get the next position.
|
Constructor | Description |
---|---|
VehicleMoveEvent(Vehicle vehicle,
Location from,
Location to) |
Modifier and Type | Method | Description |
---|---|---|
Location |
StructureGrowEvent.getLocation() |
Gets the location of the structure.
|
Location |
SpawnChangeEvent.getPreviousLocation() |
Gets the previous spawn location
|
Constructor | Description |
---|---|
SpawnChangeEvent(World world,
Location previousLocation) |
|
StructureGrowEvent(Location location,
TreeType species,
boolean bonemeal,
Player player,
List<BlockState> blocks) |
Modifier and Type | Method | Description |
---|---|---|
Location |
ChunkGenerator.getFixedSpawnLocation(World world,
Random random) |
Gets a fixed spawn location to use for a given world.
|
Modifier and Type | Method | Description |
---|---|---|
Location |
Inventory.getLocation() |
Get the location of the block or entity which corresponds to this inventory.
|
Modifier and Type | Method | Description |
---|---|---|
Location |
LootContext.getLocation() |
The
Location to store where the loot will be generated. |
Constructor | Description |
---|---|
Builder(Location location) |
Creates a new LootContext.Builder instance to facilitate easy
creation of
LootContext s. |
Modifier and Type | Method | Description |
---|---|---|
Location |
Vector.toLocation(World world) |
Gets a Location version of this vector with yaw and pitch being 0.
|
Location |
Vector.toLocation(World world,
float yaw,
float pitch) |
Gets a Location version of this vector.
|
Modifier and Type | Method | Description |
---|---|---|
static BoundingBox |
BoundingBox.of(Location center,
double x,
double y,
double z) |
Creates a new bounding box using the given center and extents.
|
static BoundingBox |
BoundingBox.of(Location corner1,
Location corner2) |
Creates a new bounding box using the coordinates of the given locations
as corners.
|
BoundingBox |
BoundingBox.shift(Location shift) |
Shifts this bounding box by the given amounts.
|
BoundingBox |
BoundingBox.union(Location position) |
Expands this bounding box to contain (or border) the specified position.
|
Constructor | Description |
---|---|
BlockIterator(Location loc) |
Constructs the BlockIterator.
|
BlockIterator(Location loc,
double yOffset) |
Constructs the BlockIterator.
|
BlockIterator(Location loc,
double yOffset,
int maxDistance) |
Constructs the BlockIterator.
|
Modifier and Type | Method | Description |
---|---|---|
Location |
PlayerSpawnLocationEvent.getSpawnLocation() |
Gets player's spawn location.
|
Modifier and Type | Method | Description |
---|---|---|
void |
PlayerSpawnLocationEvent.setSpawnLocation(Location location) |
Sets player's spawn location.
|
Constructor | Description |
---|---|
PlayerSpawnLocationEvent(Player who,
Location spawnLocation) |
Copyright © 2020. All rights reserved.