Uses of Class
org.bukkit.Location
Package
Description
The root package of the Bukkit API, contains generalized API classes.
Classes used to manipulate the voxels in a
world
,
including special states.Generalized BlockData classes.
Classes concerning the creation of boss bars that appear at the top of the
player's screen.
Classes relating to handling specialized non-chat player input.
Classes dedicated to handling a plugin's runtime configuration.
Classes concerning damage types and sources applicable to living entities.
Interfaces for non-voxel objects that can exist in a
world
, including all players, monsters, projectiles, etc.Classes concerning an entity's persistent memory.
Events
relating to programmatic state
changes on the server.Events
relating to vehicular entities
.Classes to facilitate
world
generation
implementation.Classes involved in manipulating player inventories and item interactions.
The interfaces used when manipulating extra data can can be stored inside
item stacks
.Classes relevant to loot table manipulation and generation.
Classes related to creating or using
structures
without creating Structure
blocks
in the world.Multi and single purpose classes to facilitate various programmatic
concepts.
Spigot-specific player events.
-
Uses of Location in com.destroystokyo.paper
Modifier and TypeMethodDescriptionSets the location of where to spawn the particle -
Uses of Location in com.destroystokyo.paper.brigadier
Modifier and TypeMethodDescriptionBukkitBrigadierCommandSource.getBukkitLocation()
Deprecated, for removal: This API element is subject to removal in a future version. -
Uses of Location in com.destroystokyo.paper.entity
Modifier and TypeMethodDescriptionPathfinder.PathResult.getFinalPoint()
Pathfinder.PathResult.getNextPoint()
Modifier and TypeMethodDescriptionPathfinder.PathResult.getPoints()
All currently calculated points to follow along the path to reach the destination locationModifier and TypeMethodDescriptionCalculates a destination for the Entity to navigate to, but does not set it as the current target.default boolean
Calculates a destination for the Entity to navigate to, and sets it with default speed as the current target.default boolean
Calculates a destination for the Entity to navigate to, with desired speed as the current target. -
Uses of Location in com.destroystokyo.paper.event.entity
Modifier and TypeMethodDescriptionEntityPathfindEvent.getLoc()
The Location of where the entity is about to move to.TurtleLayEggEvent.getLocation()
Get the location where the eggs are being laidTurtleStartDiggingEvent.getLocation()
Get the location where the turtle is diggingPreSpawnerSpawnEvent.getSpawnerLocation()
PreCreatureSpawnEvent.getSpawnLocation()
ModifierConstructorDescriptionEntityPathfindEvent
(Entity entity, Location location, @Nullable Entity targetEntity) EntityTeleportEndGatewayEvent
(Entity entity, 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) -
Uses of Location in com.destroystokyo.paper.event.player
Modifier and TypeMethodDescriptionPlayerJumpEvent.getFrom()
Gets the location this player jumped fromPlayerSetSpawnEvent.getLocation()
Gets the location that the spawn is set to.PlayerPostRespawnEvent.getRespawnedLocation()
Returns the location of the respawned playerPlayerJumpEvent.getTo()
Gets the location this player jumped toModifier and TypeMethodDescriptionvoid
Sets the location to mark as where the player jumped fromvoid
PlayerSetSpawnEvent.setLocation
(@Nullable Location location) Sets the location to be set as the spawn location.ModifierConstructorDescriptionPlayerJumpEvent
(Player player, Location from, Location to) PlayerPostRespawnEvent
(Player respawnPlayer, Location respawnedLocation, boolean isBedSpawn) PlayerSetSpawnEvent
(Player player, PlayerSetSpawnEvent.Cause cause, @Nullable Location location, boolean forced, boolean notifyPlayer, @Nullable Component notification) PlayerTeleportEndGatewayEvent
(Player player, Location from, Location to, EndGateway gateway) -
Uses of Location in com.destroystokyo.paper.event.server
ModifierConstructorDescriptionAsyncTabCompleteEvent
(CommandSender sender, String buffer, boolean isCommand, @Nullable Location loc) AsyncTabCompleteEvent
(CommandSender sender, List<String> completions, String buffer, boolean isCommand, @Nullable Location loc) Deprecated. -
Uses of Location in io.papermc.paper.block.fluid
Modifier and TypeMethodDescriptionFluidData.computeFlowDirection
(Location location) Computes the direction of the flow of the liquid at the given location as a vector.@org.jetbrains.annotations.Range(from=0L, to=1L) float
FluidData.computeHeight
(Location location) Computes the height of the fluid in the world. -
Uses of Location in io.papermc.paper.command.brigadier
Modifier and TypeMethodDescriptionCommandSourceStack.getLocation()
Gets the location that this command is being executed at. -
Uses of Location in io.papermc.paper.datacomponent.item
Modifier and TypeMethodDescriptionLodestoneTracker.location()
The location that the compass should point towards.Modifier and TypeMethodDescriptionSets the location to point towards for this builder.static LodestoneTracker
LodestoneTracker.lodestoneTracker
(@Nullable Location location, boolean tracked) -
Uses of Location in io.papermc.paper.event.entity
Modifier and TypeMethodDescriptionEntityMoveEvent.getFrom()
Gets the location this entity moved fromEntityMoveEvent.getTo()
Gets the location this entity moved toModifier and TypeMethodDescriptionvoid
Sets the location to mark as where the entity moved fromvoid
Sets the location that this entity will move to -
Uses of Location in io.papermc.paper.event.player
Modifier and TypeMethodDescriptionPlayerFailMoveEvent.getFrom()
Gets the location this player moved fromPlayerFailMoveEvent.getTo()
Gets the location this player tried to move toModifierConstructorDescriptionPlayerFailMoveEvent
(Player player, PlayerFailMoveEvent.FailReason failReason, boolean allowed, boolean logWarning, Location from, Location to) -
Uses of Location in io.papermc.paper.event.world
Modifier and TypeMethodDescriptionStructuresLocateEvent.getOrigin()
Gets theLocation
from which the search is to be conducted.StructuresLocateEvent.Result.position()
Deprecated, for removal: This API element is subject to removal in a future version.ModifierConstructorDescriptionStructuresLocateEvent
(World world, Location origin, List<Structure> structures, int radius, boolean findUnexplored) -
Uses of Location in io.papermc.paper.event.world.border
Modifier and TypeMethodDescriptionWorldBorderCenterChangeEvent.getNewCenter()
Gets the new center location for the world border.WorldBorderCenterChangeEvent.getOldCenter()
Gets the original center location of the world border.Modifier and TypeMethodDescriptionvoid
WorldBorderCenterChangeEvent.setNewCenter
(Location newCenter) Sets the new center location for the world border.ModifierConstructorDescriptionWorldBorderCenterChangeEvent
(World world, WorldBorder worldBorder, Location oldCenter, Location newCenter) -
Uses of Location in io.papermc.paper.math
Modifier and TypeMethodDescriptiondefault Location
Position.toLocation
(World world) Creates a new location object at this position with the specified worldModifier and TypeMethodDescriptionstatic BlockPosition
Creates a position from the location.static FinePosition
Creates a position from the location. -
Uses of Location in io.papermc.paper.threadedregions.scheduler
Modifier and TypeMethodDescriptiondefault void
Schedules a task to be executed on the region which owns the location.default @NotNull ScheduledTask
RegionScheduler.run
(@NotNull Plugin plugin, @NotNull Location location, @NotNull Consumer<ScheduledTask> task) Schedules a task to be executed on the region which owns the location on the next tick.default @NotNull ScheduledTask
RegionScheduler.runAtFixedRate
(@NotNull Plugin plugin, @NotNull Location location, @NotNull Consumer<ScheduledTask> task, long initialDelayTicks, long periodTicks) Schedules a repeating task to be executed on the region which owns the location after the initial delay with the specified period.default @NotNull ScheduledTask
RegionScheduler.runDelayed
(@NotNull Plugin plugin, @NotNull Location location, @NotNull Consumer<ScheduledTask> task, long delayTicks) Schedules a task to be executed on the region which owns the location after the specified delay in ticks. -
Uses of Location in org.bukkit
Modifier and TypeMethodDescriptionLocation.add
(double x, double y, double z) Adds the location by another.Adds the location by another.Takes the x/y/z from base and adds the specified x/y/z to it and returns selfAdds the location by a vector.Location.clone()
Location.deserialize
(@NotNull Map<String, Object> args) Required method for deserializationWorld.findLightningRod
(@NotNull Location location) Finds the location of the nearest unobstructed Lightning Rod in a 128-block radius around the given location.World.findLightningTarget
(@NotNull Location location) Finds a targetLocation
for lightning to strike.OfflinePlayer.getBedSpawnLocation()
Deprecated.Misleading name.WorldBorder.getCenter()
Gets the current border center.OfflinePlayer.getLastDeathLocation()
Gets the player's last death location.OfflinePlayer.getLocation()
Gets the player's current location.Raid.getLocation()
Gets the center location where the raid occurs.Vibration.Destination.BlockDestination.getLocation()
World.getLocationAtKey
(long key) Deprecated.Vibration.getOrigin()
Deprecated, for removal: This API element is subject to removal in a future version.unused as of 1.19OfflinePlayer.getRespawnLocation()
Gets the Location where the player will spawn at, null if they don't have a valid respawn point.World.getSpawnLocation()
Gets the default spawnLocation
of this worldParticle.TargetColor.getTarget()
The target of the particles to be displayed.World.locateNearestBiome
(@NotNull Location origin, @NotNull Biome biome, int radius) Deprecated.World.locateNearestBiome
(@NotNull Location origin, @NotNull Biome biome, int radius, int step) Deprecated.World.locateNearestStructure
(@NotNull Location origin, StructureType structureType, int radius, boolean findUnexplored) Location.multiply
(double m) Performs scalar multiplication, multiplying all components with a scalar.Location.set
(double x, double y, double z) Sets the position of this Location and returns itselfLocation.setDirection
(@NotNull Vector vector) Location.subtract
(double x, double y, double z) Subtracts the location by another.Subtracts the location by another.Takes the x/y/z from base and subtracts the specified x/y/z to it and returns selfSubtracts the location by a vector.Location.toBlockLocation()
Location.toCenterLocation()
Location.toHighestLocation()
Returns a copy of this location except with y = getWorld().getHighestBlockYAt(this.getBlockX(), this.getBlockZ())Location.toHighestLocation
(@NotNull HeightMap heightMap) Returns a copy of this location except with y = getWorld().getHighestBlockYAt(this.getBlockX(), this.getBlockZ(), heightMap)Location.toLocation
(@NotNull World world) Location.zero()
Zero this location's components.Modifier and TypeMethodDescriptionAdds the location by another.Takes the x/y/z from base and adds the specified x/y/z to it and returns self<T extends Entity>
TRegionAccessor.createEntity
(@NotNull Location location, @NotNull Class<T> clazz) Creates an entity of a specific class at the givenLocation
but does not spawn it in the world.Bukkit.createExplorerMap
(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType) Bukkit.createExplorerMap
(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType, int radius, boolean findUnexplored) Bukkit.createExplorerMap
(@NotNull World world, @NotNull Location location, StructureType structureType, MapCursor.Type mapIcon) Create a new explorer map targeting the closest nearby structure of a givenStructureType
.Bukkit.createExplorerMap
(@NotNull World world, @NotNull Location location, StructureType structureType, MapCursor.Type mapIcon, int radius, boolean findUnexplored) Create a new explorer map targeting the closest nearby structure of a givenStructureType
.Server.createExplorerMap
(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType) Server.createExplorerMap
(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType, int radius, boolean findUnexplored) Server.createExplorerMap
(@NotNull World world, @NotNull Location location, StructureType structureType, MapCursor.Type mapIcon) Create a new explorer map targeting the closest nearby structure of a givenStructureType
.Server.createExplorerMap
(@NotNull World world, @NotNull Location location, StructureType structureType, MapCursor.Type mapIcon, int radius, boolean findUnexplored) Create a new explorer map targeting the closest nearby structure of a givenStructureType
.boolean
World.createExplosion
(@NotNull Location loc, float power) Creates explosion at given coordinates with given powerboolean
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.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.default 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
(@Nullable Entity source, @NotNull Location loc, float power, boolean setFire, boolean breakBlocks, boolean excludeSourceFromDamage) Creates explosion at given location with given power and optionally setting blocks on fire, with the specified entity as the source.double
Get the distance between this location and another.double
Location.distanceSquared
(@NotNull Location o) Get the squared distance between this location and another.Drops an item at the specifiedLocation
World.dropItem
(@NotNull Location location, @NotNull ItemStack item, @Nullable Consumer<? super Item> function) Drops an item at the specifiedLocation
Note that functions will run before the entity is spawnedWorld.dropItemNaturally
(@NotNull Location location, @NotNull ItemStack item) Drops an item at the specifiedLocation
with a random offsetWorld.dropItemNaturally
(@NotNull Location location, @NotNull ItemStack item, @Nullable Consumer<? super Item> function) Drops an item at the specifiedLocation
with a random offset Note that functions will run before the entity is spawnedWorld.findLightningRod
(@NotNull Location location) Finds the location of the nearest unobstructed Lightning Rod in a 128-block radius around the given location.World.findLightningTarget
(@NotNull Location location) Finds a targetLocation
for lightning to strike.boolean
RegionAccessor.generateTree
(@NotNull Location location, @NotNull Random random, @NotNull TreeType type) Creates a tree at the givenLocation
boolean
RegionAccessor.generateTree
(@NotNull Location location, @NotNull Random random, @NotNull TreeType type, @Nullable Consumer<? super BlockState> stateConsumer) Creates a tree at the givenLocation
boolean
RegionAccessor.generateTree
(@NotNull Location location, @NotNull Random random, @NotNull TreeType type, @Nullable Predicate<? super BlockState> statePredicate) Creates a tree at the givenLocation
boolean
World.generateTree
(@NotNull Location location, @NotNull TreeType type) Creates a tree at the givenLocation
boolean
World.generateTree
(@NotNull Location loc, @NotNull TreeType type, @NotNull BlockChangeDelegate delegate) Deprecated.this method does not handle tile entities (bee nests)World.getBlockAt
(@NotNull Location location) RegionAccessor.getBlockData
(@NotNull Location location) RegionAccessor.getBlockState
(@NotNull Location location) Gets theBlockState
at the givenLocation
.World.getChunkAt
(@NotNull Location location) default CompletableFuture
<Chunk> World.getChunkAtAsync
(@NotNull Location loc) Requests aChunk
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 aChunk
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
default void
default void
World.getChunkAtAsync
(@NotNull Location loc, @NotNull World.ChunkLoadCallback cb) Deprecated.Use either the Future or the Consumer based methodsdefault CompletableFuture
<Chunk> World.getChunkAtAsyncUrgently
(@NotNull Location loc) Requests aChunk
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 aChunk
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) default FluidData
RegionAccessor.getFluidData
(@NotNull Location location) Gets theFluidData
at the given positionWorld.getHighestBlockAt
(@NotNull Location location) Gets the highest non-empty (impassable) block at the given coordinates.World.getHighestBlockAt
(@NotNull Location location, @NotNull HeightMap heightMap) Gets the highest block corresponding to theHeightMap
at the given coordinates.int
RegionAccessor.getHighestBlockYAt
(@NotNull Location location) Gets the highest non-empty (impassable) coordinate at the givenLocation
.int
RegionAccessor.getHighestBlockYAt
(@NotNull Location location, @NotNull HeightMap heightMap) float
World.getLocalDifficultyAt
(@NotNull Location location) Gets the local difficulty (based on inhabited time) at a locationWorld.getNearbyEntities
(@NotNull Location location, double x, double y, double z) Returns a list of entities within a bounding box centered around a Location.World.getNearbyEntities
(@NotNull Location location, double x, double y, double z, @Nullable Predicate<? super Entity> filter) Returns a list of entities within a bounding box centered around a Location.default <T extends Entity>
@NotNull Collection<T> World.getNearbyEntitiesByType
(@Nullable Class<? extends Entity> clazz, @NotNull Location loc, double xRadius, double yRadius, double zRadius, @Nullable Predicate<? super T> predicate) Gets all nearby entities of the specified type, within the specified radius (bounding box)default <T extends Entity>
@NotNull Collection<T> 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>
@NotNull Collection<T> 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>
@NotNull Collection<T> 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>
@NotNull Collection<T> World.getNearbyEntitiesByType
(@Nullable Class<? extends T> clazz, @NotNull Location loc, double xzRadius, double yRadius, @Nullable Predicate<? super 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>
@NotNull Collection<T> World.getNearbyEntitiesByType
(@Nullable Class<? extends T> clazz, @NotNull Location loc, double radius, @Nullable Predicate<? super 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 LivingEntities within the specified radius (bounding box)default @NotNull Collection
<LivingEntity> World.getNearbyLivingEntities
(@NotNull Location loc, double xzRadius, double yRadius) Gets nearby LivingEntities within the specified radius (bounding box)default @NotNull Collection
<LivingEntity> World.getNearbyLivingEntities
(@NotNull Location loc, double xRadius, double yRadius, double zRadius) Gets nearby LivingEntities within the specified radius (bounding box)default @NotNull Collection
<LivingEntity> World.getNearbyLivingEntities
(@NotNull Location loc, double xRadius, double yRadius, double zRadius, @Nullable Predicate<? super LivingEntity> predicate) Gets nearby LivingEntities within the specified radius (bounding box)default @NotNull Collection
<LivingEntity> World.getNearbyLivingEntities
(@NotNull Location loc, double xzRadius, double yRadius, @Nullable Predicate<? super LivingEntity> predicate) Gets nearby LivingEntities within the specified radius (bounding box)default @NotNull Collection
<LivingEntity> World.getNearbyLivingEntities
(@NotNull Location loc, double radius, @Nullable Predicate<? super LivingEntity> predicate) Gets nearby LivingEntities 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<? super 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<? super Player> predicate) Gets nearby players within the specified radius (bounding box)default @NotNull Collection
<Player> World.getNearbyPlayers
(@NotNull Location loc, double radius, @Nullable Predicate<? super Player> predicate) Gets nearby players within the specified radius (bounding box)Gets the type of the block at the givenLocation
.boolean
Check if the specified location is inside this border.static boolean
Bukkit.isOwnedByCurrentRegion
(@NotNull Location location) Returns whether the current thread is ticking a region and that the region being ticked owns the chunk at the specified world and block position as included in the specified location.static boolean
Bukkit.isOwnedByCurrentRegion
(@NotNull Location location, int squareRadiusChunks) Returns whether the current thread is ticking a region and that the region being ticked owns the chunks centered at the specified world and block position as included in the specified location within the specified square radius.boolean
Server.isOwnedByCurrentRegion
(@NotNull Location location) Returns whether the current thread is ticking a region and that the region being ticked owns the chunk at the specified world and block position as included in the specified location.boolean
Server.isOwnedByCurrentRegion
(@NotNull Location location, int squareRadiusChunks) Returns whether the current thread is ticking a region and that the region being ticked owns the chunks centered at the specified world and block position as included in the specified location within the specified square radius.boolean
RegionAccessor.lineOfSightExists
(@NotNull Location from, @NotNull Location to) Tell whether a line of sight exists between the given locationsWorld.locateNearestBiome
(@NotNull Location origin, int radius, int horizontalInterval, int verticalInterval, @NotNull Biome... biomes) Find the closest nearby location with a biome matching the providedBiome
(s).World.locateNearestBiome
(@NotNull Location origin, int radius, @NotNull Biome... biomes) Find the closest nearby location with a biome matching the providedBiome
(s).World.locateNearestBiome
(@NotNull Location origin, @NotNull Biome biome, int radius) Deprecated.World.locateNearestBiome
(@NotNull Location origin, @NotNull Biome biome, int radius, int step) Deprecated.World.locateNearestRaid
(@NotNull Location location, int radius) Finds the nearest raid close to the given location.World.locateNearestStructure
(@NotNull Location origin, @NotNull Structure structure, int radius, boolean findUnexplored) Find the closest nearby structure of a givenStructure
.World.locateNearestStructure
(@NotNull Location origin, @NotNull StructureType structureType, int radius, boolean findUnexplored) Find the closest nearby structure of a givenStructureType
.World.locateNearestStructure
(@NotNull Location origin, StructureType structureType, int radius, boolean findUnexplored) 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
Play a note at the provided Location in the World.void
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.void
World.playSound
(@NotNull Location location, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch, long seed) Play a Sound at the provided Location in the World.void
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 Sound sound, @NotNull SoundCategory category, float volume, float pitch, long seed) Play a Sound at the provided Location in the World.World.rayTrace
(@NotNull Location start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks, double raySize, @Nullable Predicate<? super Entity> filter) Performs a ray trace that checks for both block and entity collisions.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.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.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.World.rayTraceEntities
(@NotNull Location start, @NotNull Vector direction, double maxDistance) Performs a ray trace that checks for entity collisions.World.rayTraceEntities
(@NotNull Location start, @NotNull Vector direction, double maxDistance, double raySize) Performs a ray trace that checks for entity collisions.World.rayTraceEntities
(@NotNull Location start, @NotNull Vector direction, double maxDistance, double raySize, @Nullable Predicate<? super Entity> filter) Performs a ray trace that checks for entity collisions.World.rayTraceEntities
(@NotNull Location start, @NotNull Vector direction, double maxDistance, @Nullable Predicate<? super Entity> filter) Performs a ray trace that checks for entity collisions.static void
Bukkit.sendBlockHighlight
(@NotNull Location location, int duration) Creates debug block highlight on specified block location and show it to all players on the server.static void
Bukkit.sendBlockHighlight
(@NotNull Location location, int duration, int argb) Creates debug block highlight on specified block location and show it to all players on the server.static void
Bukkit.sendBlockHighlight
(@NotNull Location location, int duration, @NotNull String text) Creates debug block highlight on specified block location and show it to all players on the server.static void
Bukkit.sendBlockHighlight
(@NotNull Location location, int duration, @NotNull String text, int argb) Creates debug block highlight on specified block location and show it to all players on the server.static void
Bukkit.sendBlockHighlight
(@NotNull Location location, int duration, @NotNull String text, Color color, int transparency) Creates debug block highlight on specified block location and show it to all players on the server.static void
Bukkit.sendBlockHighlight
(@NotNull Location location, int duration, Color color, int transparency) Creates debug block highlight on specified block location and show it to all players on the server.void
Server.sendBlockHighlight
(@NotNull Location location, int duration) Creates debug block highlight on specified block location and show it to all players on the server.void
Server.sendBlockHighlight
(@NotNull Location location, int duration, int argb) Creates debug block highlight on specified block location and show it to all players on the server.void
Server.sendBlockHighlight
(@NotNull Location location, int duration, @NotNull String text) Creates debug block highlight on specified block location and show it to all players on the server.void
Server.sendBlockHighlight
(@NotNull Location location, int duration, @NotNull String text, int argb) Creates debug block highlight on specified block location and show it to all players on the server.void
Server.sendBlockHighlight
(@NotNull Location location, int duration, @NotNull String text, Color color, int transparency) Creates debug block highlight on specified block location and show it to all players on the server.void
Server.sendBlockHighlight
(@NotNull Location location, int duration, Color color, int transparency) Creates debug block highlight on specified block location and show it to all players on the server.void
World.sendBlockHighlight
(@NotNull Location location, int duration) Creates debug block highlight on specified block location and show it to all players on this world.void
World.sendBlockHighlight
(@NotNull Location location, int duration, int argb) Creates debug block highlight on specified block location and show it to all players on this world.void
World.sendBlockHighlight
(@NotNull Location location, int duration, @NotNull String text) Creates debug block highlight on specified block location and show it to all players on this world.void
World.sendBlockHighlight
(@NotNull Location location, int duration, @NotNull String text, int argb) Creates debug block highlight on specified block location and show it to all players on this world.void
World.sendBlockHighlight
(@NotNull Location location, int duration, @NotNull String text, Color color, int transparency) Creates debug block highlight on specified block location and show it to all players on this world.void
World.sendBlockHighlight
(@NotNull Location location, int duration, Color color, int transparency) Creates debug block highlight on specified block location and show it to all players on this world.void
void
RegionAccessor.setBlockData
(@NotNull Location location, @NotNull BlockData blockData) void
Sets the new border center.boolean
World.setSpawnLocation
(@NotNull Location location) Sets the spawn location of the world.void
<T extends Entity>
TSpawn an entity of a specific class at the givenLocation
<T extends Entity>
TRegionAccessor.spawn
(@NotNull Location location, @NotNull Class<T> clazz, boolean randomizeData, @Nullable Consumer<? super T> function) Creates a new entity at the givenLocation
with the supplied function run before the entity is added to the world.default <T extends Entity>
TRegionAccessor.spawn
(@NotNull Location location, @NotNull Class<T> clazz, @Nullable Consumer<? super T> function) Spawn an entity of a specific class at the givenLocation
, with the supplied function run before the entity is added to the world.<T extends Entity>
TRegionAccessor.spawn
(@NotNull Location location, @NotNull Class<T> clazz, @Nullable Consumer<? super T> function, @NotNull CreatureSpawnEvent.SpawnReason reason) default <T extends Entity>
TRegionAccessor.spawn
(@NotNull Location location, @NotNull Class<T> clazz, @NotNull CreatureSpawnEvent.SpawnReason reason) default <T extends Entity>
TRegionAccessor.spawn
(@NotNull Location location, @NotNull Class<T> clazz, @NotNull CreatureSpawnEvent.SpawnReason reason, @Nullable Consumer<? super T> function) <T extends LivingEntity>
TWorld.spawn
(@NotNull Location location, @NotNull Class<T> clazz, CreatureSpawnEvent.SpawnReason spawnReason, boolean randomizeData, @Nullable Consumer<? super T> function) Creates a new entity at the givenLocation
with the supplied function run before the entity is added to the world.World.spawnArrow
(@NotNull Location location, @NotNull Vector direction, float speed, float spread) <T extends AbstractArrow>
TWorld.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 givenLocation
RegionAccessor.spawnEntity
(@NotNull Location location, @NotNull EntityType type) Creates a entity at the givenLocation
RegionAccessor.spawnEntity
(@NotNull Location loc, @NotNull EntityType type, boolean randomizeData) Creates a new entity at the givenLocation
.RegionAccessor.spawnEntity
(@NotNull Location loc, @NotNull EntityType type, @NotNull CreatureSpawnEvent.SpawnReason reason) RegionAccessor.spawnEntity
(@NotNull Location loc, @NotNull EntityType type, @NotNull CreatureSpawnEvent.SpawnReason reason, @Nullable Consumer<? super Entity> function) World.spawnFallingBlock
(@NotNull Location location, @NotNull Material material, byte data) Deprecated.Magic value.World.spawnFallingBlock
(@NotNull Location location, @NotNull BlockData data) Deprecated.UseRegionAccessor.spawn(Location, Class, Consumer)
(or a variation thereof) in combination withFallingBlock.setBlockData(BlockData)
World.spawnFallingBlock
(@NotNull Location location, @NotNull MaterialData data) Deprecated.UseRegionAccessor.spawn(Location, Class, Consumer)
(or a variation thereof) in combination withFallingBlock.setBlockData(BlockData)
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.World.Spigot.strikeLightning
(@NotNull Location loc, boolean isSilent) Deprecated.sound is now client side and cannot be removedWorld.strikeLightning
(@NotNull Location loc) Strikes lightning at the givenLocation
World.Spigot.strikeLightningEffect
(@NotNull Location loc, boolean isSilent) Deprecated.sound is now client side and cannot be removedWorld.strikeLightningEffect
(@NotNull Location loc) Strikes lightning at the givenLocation
without doing damageSubtracts the location by another.Takes the x/y/z from base and subtracts the specified x/y/z to it and returns selfboolean
OfflinePlayer.teleportOffline
(Location destination) Sets OfflinePlayer's location.boolean
OfflinePlayer.teleportOffline
(Location destination, PlayerTeleportEvent.TeleportCause cause) Sets OfflinePlayer's location.OfflinePlayer.teleportOfflineAsync
(@NotNull Location destination) Sets OfflinePlayer's location.OfflinePlayer.teleportOfflineAsync
(@NotNull Location destination, PlayerTeleportEvent.TeleportCause cause) Sets OfflinePlayer's location.ModifierConstructorDescriptionBlockDestination
(@NotNull Location block) TargetColor
(@NotNull Location target, @NotNull Color color) Vibration
(@NotNull Location origin, @NotNull Vibration.Destination destination, int arrivalTime) Deprecated, for removal: This API element is subject to removal in a future version. -
Uses of Location in org.bukkit.block
Modifier and TypeMethodDescriptionEndGateway.getExitLocation()
Gets the location that entities are teleported to when entering the gateway portal.Beehive.getFlower()
Get the hive's flower location.Block.getLocation()
Gets the Location of the blockBlock.getLocation
(@Nullable Location loc) Stores the location of the block in the provided Location object.BlockState.getLocation()
Gets the location of this block state.BlockState.getLocation
(@Nullable Location loc) Stores the location of this block state in the provided Location object.DoubleChest.getLocation()
Modifier and TypeMethodDescriptionCopies the state to another block as an unplaced BlockState.Block.getLocation
(@Nullable Location loc) Stores the location of the block in the provided Location object.BlockState.getLocation
(@Nullable Location loc) Stores the location of this block state in the provided Location object.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
Set the hive's flower location. -
Uses of Location in org.bukkit.block.data
Modifier and TypeMethodDescriptionBlockData.getCollisionShape
(@NotNull Location location) Calculates the collision shape this block data would have at a particular location.boolean
BlockData.isSupported
(@NotNull Location location) Checks if this state would be properly supported if it were placed at the block at the givenLocation
. -
Uses of Location in org.bukkit.boss
Modifier and TypeMethodDescriptionDragonBattle.getEndPortalLocation()
Get the location of the end portal. -
Uses of Location in org.bukkit.command
Modifier and TypeMethodDescriptionCommand.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.CommandMap.tabComplete
(@NotNull CommandSender sender, @NotNull String cmdLine, @Nullable Location location) Looks for the requested command and executes an appropriate tab-completer if found.SimpleCommandMap.tabComplete
(@NotNull CommandSender sender, @NotNull String cmdLine, @Nullable Location location) -
Uses of Location in org.bukkit.configuration
Modifier and TypeMethodDescriptionConfigurationSection.getLocation
(@NotNull String path) Gets the requested Location by path.ConfigurationSection.getLocation
(@NotNull String path, @Nullable Location def) Gets the requestedLocation
by path, returning a default value if not found.MemorySection.getLocation
(@NotNull String path) MemorySection.getLocation
(@NotNull String path, @Nullable Location def) -
Uses of Location in org.bukkit.damage
Modifier and TypeMethodDescriptionDamageSource.getDamageLocation()
Get theLocation
from where the damage originated.DamageSource.getSourceLocation()
Get theLocation
from where the damage originated.Modifier and TypeMethodDescriptionDamageSource.Builder.withDamageLocation
(@NotNull Location location) Set theLocation
of the source of damage. -
Uses of Location in org.bukkit.entity
Modifier and TypeMethodDescriptionSniffer.findPossibleDigLocation()
Try to get a possible location where the sniffer can dig.Phantom.getAnchorLocation()
Gets the location that this phantom circles around when not attacking a player This will be changed after attacking a player.EnderCrystal.getBeamTarget()
Gets the location that this end crystal is pointing its beam to.HumanEntity.getBedLocation()
Gets the location of the bed the player is currently sleeping inPlayer.getBedSpawnLocation()
Deprecated.Misleading name.Vex.getBound()
Gets the bound of this entity.Player.getCompassTarget()
Get the previously set compass target.LivingEntity.getEyeLocation()
Get a Location detailing the current eye position of the living entity.Bee.getFlower()
Get the bee's flower location.Bee.getHive()
Get the bee's hive location.Turtle.getHome()
Get the turtle's home locationAllay.getJukebox()
Gets the jukebox the allay is set to dance to.HumanEntity.getLastDeathLocation()
Gets the player's last death location.Entity.getLocation()
Gets the entity's current positionEntity.getLocation
(@Nullable Location loc) Stores the entity's current position in the provided Location object.Entity.getOrigin()
Gets the location where this entity originates from.EnderDragon.getPodium()
Get the podium location used by the ender dragon.HumanEntity.getPotentialBedLocation()
Gets the Location of the player's bed, null if they have not slept in one.Player.getRespawnLocation()
Gets the Location where the player will spawn at, null if they don't have a valid respawn point.default Location
FallingBlock.getSourceLoc()
Deprecated.replaced byEntity.getOrigin()
default Location
TNTPrimed.getSourceLoc()
Deprecated.replaced byEntity.getOrigin()
Bat.getTargetLocation()
Gets the location that this bat is currently trying to move towards.EnderSignal.getTargetLocation()
Get the location this EnderSignal is moving towards.Dolphin.getTreasureLocation()
Gets the treasure location this dolphin tries to guide players to.WanderingTrader.getWanderingTowards()
Gets the location that this wandering trader is currently wandering towards.Modifier and TypeMethodDescriptionSniffer.getExploredLocations()
Gets the locations explored by the sniffer.Modifier and TypeMethodDescriptionvoid
Sniffer.addExploredLocation
(@NotNull Location location) Add a location to the explored locations.boolean
Entity.collidesAt
(@NotNull Location location) Checks for any collisions with the entity's bounding box at the provided location.Creates a copy of this entity and all its data.EntitySnapshot.createEntity
(@NotNull Location to) Creates an entity using this template and spawns it at the provided location.Entity.getLocation
(@Nullable Location loc) Stores the entity's current position in the provided Location object.boolean
LivingEntity.hasLineOfSight
(@NotNull Location location) Checks whether the living entity has block line of sight to the given block.void
Instruct this Mob to look at a specific Locationvoid
Instruct this Mob to look at a specific LocationOpens an empty anvil inventory window with the player's inventory on the bottom.HumanEntity.openCartographyTable
(@Nullable Location location, boolean force) Opens an empty cartography table inventory window with the player's inventory on the bottom.HumanEntity.openEnchanting
(@Nullable Location location, boolean force) Opens an empty enchanting inventory window with the player's inventory on the bottom.HumanEntity.openGrindstone
(@Nullable Location location, boolean force) Opens an empty grindstone inventory window with the player's inventory on the bottom.Opens an empty loom inventory window with the player's inventory on the bottom.HumanEntity.openSmithingTable
(@Nullable Location location, boolean force) Opens an empty smithing table inventory window with the player's inventory on the bottom.HumanEntity.openStonecutter
(@Nullable Location location, boolean force) Opens an empty stonecutter inventory window with the player's inventory on the bottom.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
Deprecated.Magic valuevoid
Play a note for the player at a location.void
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.playSound
(@NotNull Location location, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch, long seed) Play a sound for a player at the location.void
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 Sound sound, @NotNull SoundCategory category, float volume, float pitch, long seed) Play a sound for a player at the location.void
Sniffer.removeExploredLocation
(@NotNull Location location) Remove a location of the explored locations.void
Player.sendBlockChange
(@NotNull Location loc, @NotNull Material material, byte data) Deprecated.Magic valuevoid
Player.sendBlockChange
(@NotNull Location loc, @NotNull BlockData block) Send a block change.void
Player.sendBlockDamage
(@NotNull Location loc, float progress) Send block damage.void
Player.sendBlockDamage
(@NotNull Location loc, float progress, int sourceId) Send block damage.void
Player.sendBlockDamage
(@NotNull Location loc, float progress, @NotNull Entity source) Send block damage.void
Player.sendBlockHighlight
(@NotNull Location location, int duration) Creates debug block highlight on specified block location and show it to this player.void
Player.sendBlockHighlight
(@NotNull Location location, int duration, int argb) Creates debug block highlight on specified block location and show it to this player.void
Player.sendBlockHighlight
(@NotNull Location location, int duration, @NotNull String text) Creates debug block highlight on specified block location and show it to this player.void
Player.sendBlockHighlight
(@NotNull Location location, int duration, @NotNull String text, int argb) Creates debug block highlight on specified block location and show it to this player.void
Player.sendBlockHighlight
(@NotNull Location location, int duration, @NotNull String text, Color color, int transparency) Creates debug block highlight on specified block location and show it to this player.void
Player.sendBlockHighlight
(@NotNull Location location, int duration, Color color, int transparency) Creates debug block highlight on specified block location and show it to this player.void
Player.sendBlockUpdate
(@NotNull Location loc, @NotNull TileState tileState) Send a TileState change.void
Player.sendSignChange
(@NotNull Location loc, @Nullable String[] lines) Deprecated.UsePlayer.sendBlockUpdate(Location, TileState)
by creating a new virtualSign
block state viaBlockData.createBlockState()
(constructed e.g.void
Deprecated.UsePlayer.sendBlockUpdate(Location, TileState)
by creating a new virtualSign
block state viaBlockData.createBlockState()
(constructed e.g.void
Player.sendSignChange
(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor, boolean hasGlowingText) Deprecated.UsePlayer.sendBlockUpdate(Location, TileState)
by creating a new virtualSign
block state viaBlockData.createBlockState()
(constructed e.g.default void
Player.sendSignChange
(@NotNull Location loc, List<? extends Component> lines) Deprecated.UsePlayer.sendBlockUpdate(Location, TileState)
by creating a new virtualSign
block state viaBlockData.createBlockState()
(constructed e.g.default void
Player.sendSignChange
(@NotNull Location loc, List<? extends Component> lines, boolean hasGlowingText) Deprecated.UsePlayer.sendBlockUpdate(Location, TileState)
by creating a new virtualSign
block state viaBlockData.createBlockState()
(constructed e.g.default void
Player.sendSignChange
(@NotNull Location loc, List<? extends Component> lines, @NotNull DyeColor dyeColor) Deprecated.UsePlayer.sendBlockUpdate(Location, TileState)
by creating a new virtualSign
block state viaBlockData.createBlockState()
(constructed e.g.void
Player.sendSignChange
(@NotNull Location loc, List<? extends Component> lines, @NotNull DyeColor dyeColor, boolean hasGlowingText) Deprecated.UsePlayer.sendBlockUpdate(Location, TileState)
by creating a new virtualSign
block state viaBlockData.createBlockState()
(constructed e.g.void
Phantom.setAnchorLocation
(Location location) Sets the location that this phantom circles around when not attacking a playervoid
EnderCrystal.setBeamTarget
(@Nullable Location location) Sets the location that this end crystal is pointing to.void
Player.setBedSpawnLocation
(@Nullable Location location) Deprecated.Misleading name.void
Player.setBedSpawnLocation
(@Nullable Location location, boolean force) Deprecated.Misleading name.void
Sets the bound of this entity.void
Player.setCompassTarget
(@NotNull Location loc) Set the target of the player's compass.void
Warden.setDisturbanceLocation
(@NotNull Location location) Make the warden sense a disturbance in the force at the location given.void
Set the bee's flower location.void
Set the bee's hive location.void
Set the turtle's home locationvoid
HumanEntity.setLastDeathLocation
(@Nullable Location location) Sets the player's last death location.void
Sets the location of the podium for the ender dragon.void
Player.setRespawnLocation
(@Nullable Location location) Sets the Location where the player will respawn.void
Player.setRespawnLocation
(@Nullable Location location, boolean force) Sets the Location where the player will respawn.void
Bat.setTargetLocation
(Location location) Sets the location that this bat is currently trying to move towards.void
EnderSignal.setTargetLocation
(@NotNull Location location) Set theLocation
this EnderSignal is moving towards.void
EnderSignal.setTargetLocation
(@NotNull Location location, boolean update) Set theLocation
this EnderSignal is moving towards.void
Dolphin.setTreasureLocation
(@NotNull Location location) Sets the treasure location that this dolphin will try to lead the player to.void
WanderingTrader.setWanderingTowards
(Location location) Sets the location that this wandering trader is currently wandering towards.boolean
Attempts to make the entity sleep at the given location.boolean
Attempts to make this villager sleep at the given location.default boolean
Spawns the entity in the world at the givenLocation
with the default spawn reason.boolean
Entity.spawnAt
(@NotNull Location location, CreatureSpawnEvent.SpawnReason reason) Spawns the entity in the world at the givenLocation
with the reason given.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, double extra, T data, boolean force) 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.void
Allay.startDancing
(@NotNull Location location) Causes the allay to start dancing because of the provided jukebox location.boolean
Teleports this entity to the given location.default boolean
Entity.teleport
(@NotNull Location location, TeleportFlag @NotNull ... teleportFlags) Teleports this entity to the given location.boolean
Entity.teleport
(@NotNull Location location, @NotNull PlayerTeleportEvent.TeleportCause cause) Teleports this entity to the given location.boolean
Entity.teleport
(@NotNull Location location, @NotNull PlayerTeleportEvent.TeleportCause cause, TeleportFlag @NotNull ... teleportFlags) Teleports this entity to the given location.default @NotNull 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 @NotNull 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.Entity.teleportAsync
(@NotNull Location loc, @NotNull PlayerTeleportEvent.TeleportCause cause, TeleportFlag @NotNull ... teleportFlags) Loads/Generates(in 1.13+) the Chunk asynchronously, and then teleports the entity when the chunk is ready. -
Uses of Location in org.bukkit.entity.memory
Modifier and TypeFieldDescriptionMemoryKey.HOME
MemoryKey.JOB_SITE
MemoryKey.LIKED_NOTEBLOCK_POSITION
MemoryKey.MEETING_POINT
MemoryKey.POTENTIAL_JOB_SITE
MemoryKey.SNIFFER_EXPLORED_POSITIONS
Deprecated.this constant uses the wrong generic type, the sniffer now stores different positions from possibly different worlds. -
Uses of Location in org.bukkit.event.block
-
Uses of Location in org.bukkit.event.entity
Modifier and TypeMethodDescriptionEntityTeleportEvent.getFrom()
Gets the location that this entity moved fromEntityExplodeEvent.getLocation()
Returns the location where the explosion happened.EntityPortalEnterEvent.getLocation()
Gets the portal block the entity is touchingEntitySpawnEvent.getLocation()
Gets the location at which the entity is spawning.ItemDespawnEvent.getLocation()
Gets the location at which the item is despawning.EntityPortalEvent.getTo()
ForPortalType.NETHER
, this is initially just the starting point for the search for a portal to teleport to.EntityTeleportEvent.getTo()
Gets the location that this entity moved toModifier and TypeMethodDescriptionvoid
Sets the location that this entity moved fromvoid
See the description ofEntityPortalEvent.getTo()
.void
Sets the location that this entity moved toModifierConstructorDescriptionEntityExplodeEvent
(@NotNull Entity what, @NotNull Location location, @NotNull List<Block> blocks, float yield, @NotNull ExplosionResult result) EntityPortalEnterEvent
(@NotNull Entity entity, @NotNull Location location) Deprecated.EntityPortalEnterEvent
(@NotNull Entity entity, @NotNull Location location, PortalType portalType) EntityPortalEvent
(@NotNull Entity entity, @NotNull Location from, @Nullable Location to, int searchRadius) EntityPortalEvent
(@NotNull Entity entity, @NotNull Location from, @Nullable Location to, int searchRadius, boolean canCreatePortal, int creationRadius) EntityPortalEvent
(@NotNull Entity entity, @NotNull Location from, @Nullable Location to, int searchRadius, boolean canCreatePortal, int creationRadius, PortalType portalType) EntityPortalExitEvent
(@NotNull Entity entity, @NotNull Location from, @NotNull Location to, @NotNull Vector before, @NotNull Vector after) ItemDespawnEvent
(@NotNull Item despawnee, @NotNull Location loc) ItemSpawnEvent
(@NotNull Item spawnee, Location loc) Deprecated. -
Uses of Location in org.bukkit.event.player
Modifier and TypeMethodDescriptionPlayerMoveEvent.getFrom()
Gets the location this player moved fromPlayerInteractEvent.getInteractionPoint()
The exact point at which the interaction occurred.PlayerSpawnChangeEvent.getNewSpawn()
Deprecated, for removal: This API element is subject to removal in a future version.Gets the new spawn to be set.PlayerRespawnEvent.getRespawnLocation()
Gets the current respawn locationPlayerMoveEvent.getTo()
Gets the location this player moved toPlayerPortalEvent.getTo()
ForPlayerTeleportEvent.TeleportCause.NETHER_PORTAL
, this is initially just the starting point for the search for a portal to teleport to.Modifier and TypeMethodDescriptionvoid
Sets the location to mark as where the player moved fromvoid
PlayerSpawnChangeEvent.setNewSpawn
(@Nullable Location newSpawn) Deprecated, for removal: This API element is subject to removal in a future version.Sets the new spawn location.void
PlayerRespawnEvent.setRespawnLocation
(@NotNull Location respawnLocation) Sets the new respawn locationvoid
Sets the location that this player will move tovoid
See the description ofPlayerPortalEvent.getTo()
.ModifierConstructorDescriptionPlayerPortalEvent
(@NotNull Player player, @NotNull Location from, @Nullable Location to, @NotNull PlayerTeleportEvent.TeleportCause cause) PlayerPortalEvent
(@NotNull Player player, @NotNull Location from, @Nullable Location to, @NotNull PlayerTeleportEvent.TeleportCause cause, int getSearchRadius, boolean canCreatePortal, int creationRadius) PlayerRespawnEvent
(@NotNull Player respawnPlayer, @NotNull Location respawnLocation, boolean isBedSpawn) Deprecated.PlayerRespawnEvent
(@NotNull Player respawnPlayer, @NotNull Location respawnLocation, boolean isBedSpawn, boolean isAnchorSpawn) Deprecated.PlayerRespawnEvent
(@NotNull Player respawnPlayer, @NotNull Location respawnLocation, boolean isBedSpawn, boolean isAnchorSpawn, @NotNull PlayerRespawnEvent.RespawnReason respawnReason) Deprecated.PlayerRespawnEvent
(@NotNull Player respawnPlayer, @NotNull Location respawnLocation, boolean isBedSpawn, boolean isAnchorSpawn, @NotNull PlayerRespawnEvent.RespawnReason respawnReason, ImmutableSet.Builder<PlayerRespawnEvent.RespawnFlag> respawnFlags) PlayerSpawnChangeEvent
(@NotNull Player player, @Nullable Location newSpawn, boolean forced, @NotNull PlayerSpawnChangeEvent.Cause cause) Deprecated, for removal: This API element is subject to removal in a future version.PlayerTeleportEvent
(@NotNull Player player, @NotNull Location from, @Nullable Location to, @NotNull PlayerTeleportEvent.TeleportCause cause) PlayerTeleportEvent
(@NotNull Player player, @NotNull Location from, @Nullable Location to, @NotNull PlayerTeleportEvent.TeleportCause cause, Set<@NotNull TeleportFlag.Relative> teleportFlagSet) -
Uses of Location in org.bukkit.event.server
ModifierConstructorDescriptionTabCompleteEvent
(@NotNull CommandSender sender, @NotNull String buffer, @NotNull List<String> completions, boolean isCommand, Location location) -
Uses of Location in org.bukkit.event.vehicle
-
Uses of Location in org.bukkit.event.world
Modifier and TypeMethodDescriptionGenericGameEvent.getLocation()
Get the location where the event occurred.StructureGrowEvent.getLocation()
Gets the location of the structure.SpawnChangeEvent.getPreviousLocation()
Gets the previous spawn locationModifierConstructorDescriptionGenericGameEvent
(@NotNull GameEvent event, @NotNull Location location, @Nullable Entity entity, int radius, boolean isAsync) SpawnChangeEvent
(@NotNull World world, @NotNull Location previousLocation) StructureGrowEvent
(@NotNull Location location, @NotNull TreeType species, boolean bonemeal, @Nullable Player player, @NotNull List<BlockState> blocks) -
Uses of Location in org.bukkit.generator
Modifier and TypeMethodDescriptionChunkGenerator.getFixedSpawnLocation
(@NotNull World world, @NotNull Random random) Gets a fixed spawn location to use for a given world.Modifier and TypeMethodDescriptionboolean
LimitedRegion.isInRegion
(@NotNull Location location) Checks if the givenLocation
is in the region. -
Uses of Location in org.bukkit.inventory
Modifier and TypeMethodDescriptionInventory.getLocation()
Get the location of the block or entity which corresponds to this inventory. -
Uses of Location in org.bukkit.inventory.meta
Modifier and TypeMethodDescriptionCompassMeta.getLodestone()
Gets the location that this compass will point to.Modifier and TypeMethodDescriptionvoid
CompassMeta.setLodestone
(@Nullable Location lodestone) Sets the location this lodestone compass will point to. -
Uses of Location in org.bukkit.loot
Modifier and TypeMethodDescriptionLootContext.getLocation()
TheLocation
to store where the loot will be generated.ModifierConstructorDescriptionCreates a new LootContext.Builder instance to facilitate easy creation ofLootContext
s. -
Uses of Location in org.bukkit.structure
Modifier and TypeMethodDescriptionvoid
Fills the structure from an area in a world.void
Structure.fill
(@NotNull Location origin, @NotNull BlockVector size, boolean includeEntities) Fills the Structure from an area in a world, starting at the specified origin and extending in each axis according to the specified size vector.void
Structure.place
(@NotNull Location location, boolean includeEntities, @NotNull StructureRotation structureRotation, @NotNull Mirror mirror, int palette, float integrity, @NotNull Random random) Place a structure in the world.void
Structure.place
(@NotNull Location location, boolean includeEntities, @NotNull StructureRotation structureRotation, @NotNull Mirror mirror, int palette, float integrity, @NotNull Random random, @NotNull Collection<BlockTransformer> blockTransformers, @NotNull Collection<EntityTransformer> entityTransformers) Place a structure in the world. -
Uses of Location in org.bukkit.util
Modifier and TypeMethodDescriptionBiomeSearchResult.getLocation()
Return the location of the biome.StructureSearchResult.getLocation()
Return the location of the structure.Vector.toLocation
(@NotNull World world) Gets a Location version of this vector with yaw and pitch being 0.Vector.toLocation
(@NotNull World world, float yaw, float pitch) Gets a Location version of this vector.Modifier and TypeMethodDescriptionstatic @NotNull BoundingBox
Creates a new bounding box using the given center and extents.static @NotNull BoundingBox
Creates a new bounding box using the coordinates of the given locations as corners.Shifts this bounding box by the given amounts.Expands this bounding box to contain (or border) the specified position.ModifierConstructorDescriptionConstructs the BlockIterator.BlockIterator
(@NotNull Location loc, double yOffset) Constructs the BlockIterator.BlockIterator
(@NotNull Location loc, double yOffset, int maxDistance) Constructs the BlockIterator. -
Uses of Location in org.purpurmc.purpur.event.entity
Modifier and TypeMethodDescriptionRidableMoveEvent.getFrom()
Gets the location this entity moved fromBeeFoundFlowerEvent.getLocation()
Returns the location of the flower that the bee targetsBeeStartedPollinatingEvent.getLocation()
Returns the location of the flower that the bee pollinatesBeeStopPollinatingEvent.getLocation()
Returns the location of the flower that the bee stopped pollinatingPreEntityExplodeEvent.getLocation()
Returns the location where the explosion happened.RidableMoveEvent.getTo()
Gets the location this entity moved toModifier and TypeMethodDescriptionvoid
Sets the location to mark as where the entity moved fromvoid
Sets the location that this entity will move toModifierConstructorDescriptionBeeFoundFlowerEvent
(Bee bee, @Nullable Location location) BeeStartedPollinatingEvent
(Bee bee, Location location) BeeStopPollinatingEvent
(Bee bee, @Nullable Location location, boolean success) PreEntityExplodeEvent
(Entity what, Location location, float yield, ExplosionResult result) RidableMoveEvent
(Mob entity, Player rider, Location from, Location to) -
Uses of Location in org.spigotmc.event.player
Modifier and TypeMethodDescriptionPlayerSpawnLocationEvent.getSpawnLocation()
Gets player's spawn location.Modifier and TypeMethodDescriptionvoid
PlayerSpawnLocationEvent.setSpawnLocation
(@NotNull Location location) Sets player's spawn location.ModifierConstructorDescriptionPlayerSpawnLocationEvent
(@NotNull Player who, @NotNull Location spawnLocation)