Uses of Class
org.bukkit.Location
Packages that use 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.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.
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.
Multi and single purpose classes to facilitate various programmatic
concepts.
Spigot-specific player events.
-
Uses of Location in com.destroystokyo.paper
Methods in com.destroystokyo.paper that return LocationMethods in com.destroystokyo.paper with parameters of type LocationModifier and TypeMethodDescriptionSets the location of where to spawn the particle -
Uses of Location in com.destroystokyo.paper.entity
Methods in com.destroystokyo.paper.entity that return LocationModifier and TypeMethodDescriptionPathfinder.PathResult.getFinalPoint()Pathfinder.PathResult.getNextPoint()Methods in com.destroystokyo.paper.entity that return types with arguments of type LocationModifier and TypeMethodDescriptionPathfinder.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, seePathfinder.PathResult.getNextPointIndex()Methods in com.destroystokyo.paper.entity with parameters of type LocationModifier and TypeMethodDescriptionCalculates a destination for the Entity to navigate to, but does not set it as the current target.default booleanCalculates a destination for the Entity to navigate to, and sets it with default speed as the current target.default booleanCalculates a destination for the Entity to navigate to, with desired speed as the current target. -
Uses of Location in com.destroystokyo.paper.event.entity
Methods in com.destroystokyo.paper.event.entity that return LocationModifier 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()Constructors in com.destroystokyo.paper.event.entity with parameters of type LocationModifierConstructorDescriptionEntityTeleportEndGatewayEvent(@NotNull Entity what, @NotNull Location from, @NotNull Location to, @NotNull EndGateway gateway)PhantomPreSpawnEvent(@NotNull Location location, @NotNull Entity entity, CreatureSpawnEvent.SpawnReason reason)PreCreatureSpawnEvent(@NotNull Location location, @NotNull EntityType type, CreatureSpawnEvent.SpawnReason reason)PreSpawnerSpawnEvent(@NotNull Location location, @NotNull EntityType type, @NotNull Location spawnerLocation)TurtleLayEggEvent(@NotNull Turtle turtle, @NotNull Location location, int eggCount)TurtleStartDiggingEvent(@NotNull Turtle turtle, @NotNull Location location) -
Uses of Location in com.destroystokyo.paper.event.player
Methods in com.destroystokyo.paper.event.player that return LocationModifier and TypeMethodDescriptionPlayerJumpEvent.getFrom()Gets the location this player jumped fromPlayerPostRespawnEvent.getRespawnedLocation()Returns the location of the respawned playerPlayerJumpEvent.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.Methods in com.destroystokyo.paper.event.player with parameters of type LocationModifier and TypeMethodDescriptionvoidSets the location to mark as where the player jumped fromConstructors in com.destroystokyo.paper.event.player with parameters of type LocationModifierConstructorDescriptionPlayerInitialSpawnEvent(@NotNull Player who, @NotNull Location spawnLocation)Deprecated.PlayerPostRespawnEvent(@NotNull Player respawnPlayer, @NotNull Location respawnedLocation, boolean isBedSpawn)PlayerTeleportEndGatewayEvent(@NotNull Player player, @NotNull Location from, @NotNull Location to, @NotNull EndGateway gateway) -
Uses of Location in com.destroystokyo.paper.event.server
Methods in com.destroystokyo.paper.event.server that return LocationConstructors in com.destroystokyo.paper.event.server with parameters of type LocationModifierConstructorDescriptionAsyncTabCompleteEvent(@NotNull CommandSender sender, @NotNull String buffer, boolean isCommand, @Nullable Location loc)AsyncTabCompleteEvent(@NotNull CommandSender sender, @NotNull List<String> completions, @NotNull String buffer, boolean isCommand, @Nullable Location loc)Deprecated. -
Uses of Location in io.papermc.paper.event.entity
Methods in io.papermc.paper.event.entity that return LocationModifier and TypeMethodDescriptionEntityMoveEvent.getFrom()Gets the location this entity moved fromEntityMoveEvent.getTo()Gets the location this entity moved toMethods in io.papermc.paper.event.entity with parameters of type LocationModifier and TypeMethodDescriptionvoidSets the location to mark as where the entity moved fromvoidSets the location that this entity will move toConstructors in io.papermc.paper.event.entity with parameters of type LocationModifierConstructorDescriptionEntityMoveEvent(@NotNull LivingEntity entity, @NotNull Location from, @NotNull Location to) -
Uses of Location in io.papermc.paper.event.world
Methods in io.papermc.paper.event.world that return LocationModifier and TypeMethodDescriptionStructureLocateEvent.getOrigin()Gets theLocationfrom which the search is to be conducted.StructureLocateEvent.getResult()Gets the location set as the structure location, if it was defined.Methods in io.papermc.paper.event.world with parameters of type LocationConstructors in io.papermc.paper.event.world with parameters of type LocationModifierConstructorDescriptionStructureLocateEvent(@NotNull World world, @NotNull Location origin, @NotNull StructureType structureType, int radius, boolean findUnexplored) -
Uses of Location in io.papermc.paper.event.world.border
Methods in io.papermc.paper.event.world.border that return LocationModifier and TypeMethodDescriptionWorldBorderCenterChangeEvent.getNewCenter()Gets the new center location for the world border.WorldBorderCenterChangeEvent.getOldCenter()Gets the original center location of the world border.Methods in io.papermc.paper.event.world.border with parameters of type LocationModifier and TypeMethodDescriptionvoidWorldBorderCenterChangeEvent.setNewCenter(@NotNull Location newCenter)Sets the new center location for the world border.Constructors in io.papermc.paper.event.world.border with parameters of type LocationModifierConstructorDescriptionWorldBorderCenterChangeEvent(@NotNull World world, @NotNull WorldBorder worldBorder, @NotNull Location oldCenter, @NotNull Location newCenter) -
Uses of Location in org.bukkit
Methods in org.bukkit that return LocationModifier 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 self This mutates this object, clone first.Adds the location by a vector.Location.clone()Location.deserialize(@NotNull Map<String,Object> args)Required method for deserializationOfflinePlayer.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.WorldBorder.getCenter()Gets the current border center.Raid.getLocation()Gets the center location where the raid occurs.World.getLocationAtKey(long key)Gets theLocationat the given block keyWorld.getSpawnLocation()Gets the default spawnLocationof this worldWorld.locateNearestBiome(@NotNull Location origin, @NotNull Biome biome, int radius)Locates the nearest biome based on an origin, biome type, and radius to search.World.locateNearestBiome(@NotNull Location origin, @NotNull Biome biome, int radius, int step)Locates the nearest biome based on an origin, biome type, and radius to search and stepWorld.locateNearestStructure(@NotNull Location origin, @NotNull StructureType structureType, int radius, boolean findUnexplored)Find the closest nearby structure of a givenStructureType.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 itself This mutates this object, clone first.Location.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 self This mutates this object, clone first.Subtracts 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.toHighestLocation(HeightmapType heightmap)Deprecated.Location.zero()Zero this location's components.Methods in org.bukkit with parameters of type LocationModifier 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 This mutates this object, clone first.Bukkit.createExplorerMap(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType)Create a new explorer map targeting the closest nearby structure of a givenStructureType.Bukkit.createExplorerMap(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType, int radius, boolean findUnexplored)Create a new explorer map targeting the closest nearby structure of a givenStructureType.Server.createExplorerMap(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType)Create a new explorer map targeting the closest nearby structure of a givenStructureType.Server.createExplorerMap(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType, int radius, boolean findUnexplored)Create a new explorer map targeting the closest nearby structure of a givenStructureType.booleanWorld.createExplosion(@NotNull Location loc, float power)Creates explosion at given coordinates with given powerbooleanWorld.createExplosion(@NotNull Location loc, float power, boolean setFire)Creates explosion at given coordinates with given power and optionally setting blocks on fire.booleanWorld.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.booleanWorld.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 booleanWorld.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 booleanWorld.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.booleanWorld.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.doubleGet the distance between this location and another.doubleLocation.distanceSquared(@NotNull Location o)Get the squared distance between this location and another.Drops an item at the specifiedLocationWorld.dropItem(@NotNull Location location, @NotNull ItemStack item, @Nullable Consumer<Item> function)Drops an item at the specifiedLocationNote that functions will run before the entity is spawnedWorld.dropItemNaturally(@NotNull Location location, @NotNull ItemStack item)Drops an item at the specifiedLocationwith a random offsetWorld.dropItemNaturally(@NotNull Location location, @NotNull ItemStack item, @Nullable Consumer<Item> function)Drops an item at the specifiedLocationwith a random offset Note that functions will run before the entity is spawnedbooleanWorld.generateTree(@NotNull Location location, @NotNull TreeType type)Creates a tree at the givenLocationbooleanWorld.generateTree(@NotNull Location loc, @NotNull TreeType type, @NotNull BlockChangeDelegate delegate)Creates a tree at the givenLocationWorld.getBlockAt(@NotNull Location location)World.getChunkAt(@NotNull Location location)default CompletableFuture<Chunk>World.getChunkAtAsync(@NotNull Location loc)Requests aChunkto 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 aChunkto 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 voidWorld.getChunkAtAsync(@NotNull Location loc, boolean gen, Consumer<Chunk> cb)default voidWorld.getChunkAtAsync(@NotNull Location loc, @NotNull World.ChunkLoadCallback cb)Deprecated.Use either the Future or the Consumer based methodsdefault voidWorld.getChunkAtAsync(@NotNull Location loc, Consumer<Chunk> cb)default CompletableFuture<Chunk>World.getChunkAtAsyncUrgently(@NotNull Location loc)Requests aChunkto 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 aChunkto 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 longChunk.getChunkKey(@NotNull Location loc)World.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 theHeightMapat the given coordinates.World.getHighestBlockAt(@NotNull Location location, HeightmapType heightmap)Deprecated.Upstream has added support for this, useWorld.getHighestBlockAt(Location, HeightMap)intWorld.getHighestBlockYAt(@NotNull Location location)Gets the highest non-empty (impassable) coordinate at the givenLocation.intWorld.getHighestBlockYAt(@NotNull Location location, @NotNull HeightMap heightMap)default intWorld.getHighestBlockYAt(@NotNull Location location, HeightmapType heightmap)Deprecated.Upstream has added support for this, useWorld.getHighestBlockYAt(Location, HeightMap)World.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<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<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<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<T> predicate)Gets all nearby entities of the specified type, within the specified radius (bounding box)default @NotNull Collection<LivingEntity>World.getNearbyLivingEntities(@NotNull Location loc, double radius)Gets nearby players within the specified radius (bounding box)default @NotNull Collection<LivingEntity>World.getNearbyLivingEntities(@NotNull Location loc, double xzRadius, double yRadius)Gets nearby players within the specified radius (bounding box)default @NotNull Collection<LivingEntity>World.getNearbyLivingEntities(@NotNull Location loc, double xRadius, double yRadius, double zRadius)Gets nearby players within the specified radius (bounding box)default @NotNull Collection<LivingEntity>World.getNearbyLivingEntities(@NotNull Location loc, double xRadius, double yRadius, double zRadius, @Nullable Predicate<LivingEntity> predicate)Gets nearby players within the specified radius (bounding box)default @NotNull Collection<LivingEntity>World.getNearbyLivingEntities(@NotNull Location loc, double xzRadius, double yRadius, @Nullable Predicate<LivingEntity> predicate)Gets nearby players within the specified radius (bounding box)default @NotNull Collection<LivingEntity>World.getNearbyLivingEntities(@NotNull Location loc, double radius, @Nullable Predicate<LivingEntity> predicate)Gets nearby players within the specified radius (bounding box)default @NotNull Collection<Player>World.getNearbyPlayers(@NotNull Location loc, double radius)Gets nearby players within the specified radius (bounding box)default @NotNull Collection<Player>World.getNearbyPlayers(@NotNull Location loc, double xzRadius, double yRadius)Gets nearby players within the specified radius (bounding box)default @NotNull Collection<Player>World.getNearbyPlayers(@NotNull Location loc, double xRadius, double yRadius, double zRadius)Gets nearby players within the specified radius (bounding box)default @NotNull Collection<Player>World.getNearbyPlayers(@NotNull Location loc, double xRadius, double yRadius, double zRadius, @Nullable Predicate<Player> predicate)Gets nearby players within the specified radius (bounding box)default @NotNull Collection<Player>World.getNearbyPlayers(@NotNull Location loc, double xzRadius, double yRadius, @Nullable Predicate<Player> predicate)Gets nearby players within the specified radius (bounding box)default @NotNull Collection<Player>World.getNearbyPlayers(@NotNull Location loc, double radius, @Nullable Predicate<Player> predicate)Gets nearby players within the specified radius (bounding box)default booleanWorldBorder.isInBounds(@NotNull Location location)Deprecated.useWorldBorder.isInside(Location)for an upstream compatible replacementbooleanCheck if the specified location is inside this border.booleanWorld.lineOfSightExists(@NotNull Location from, @NotNull Location to)Tell whether a line of sight exists between the given locationsWorld.locateNearestBiome(@NotNull Location origin, @NotNull Biome biome, int radius)Locates the nearest biome based on an origin, biome type, and radius to search.World.locateNearestBiome(@NotNull Location origin, @NotNull Biome biome, int radius, int step)Locates the nearest biome based on an origin, biome type, and radius to search and stepWorld.locateNearestRaid(@NotNull Location location, int radius)Finds the nearest raid close to the given location.World.locateNearestStructure(@NotNull Location origin, @NotNull StructureType structureType, int radius, boolean findUnexplored)Find the closest nearby structure of a givenStructureType.voidWorld.playEffect(@NotNull Location location, @NotNull Effect effect, int data)Plays an effect to all players within a default radius around a given location.voidWorld.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> voidWorld.playEffect(@NotNull Location location, @NotNull Effect effect, T data)Plays an effect to all players within a default radius around a given location.<T> voidWorld.playEffect(@NotNull Location location, @NotNull Effect effect, T data, int radius)Plays an effect to all players within a given radius around a location.voidPlay a Sound at the provided Location in the World.voidWorld.playSound(@NotNull Location location, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch)Play a Sound at the provided Location in the World.voidPlay a Sound at the provided Location in the WorldvoidWorld.playSound(@NotNull Location location, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch)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<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<Entity> filter)Performs a ray trace that checks for entity collisions.World.rayTraceEntities(@NotNull Location start, @NotNull Vector direction, double maxDistance, @Nullable Predicate<Entity> filter)Performs a ray trace that checks for entity collisions.voidSets the new border center.booleanWorld.setSpawnLocation(@NotNull Location location)Sets the spawn location of the world.<T extends Entity>
TSpawn an entity of a specific class at the givenLocationdefault <T extends Entity>
TSpawn 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>
TWorld.spawn(@NotNull Location location, @NotNull Class<T> clazz, @Nullable Consumer<T> function, CreatureSpawnEvent.SpawnReason reason)default <T extends Entity>
TWorld.spawn(@NotNull Location location, @NotNull Class<T> clazz, CreatureSpawnEvent.SpawnReason reason)default <T extends Entity>
TWorld.spawn(@NotNull Location location, @NotNull Class<T> clazz, CreatureSpawnEvent.SpawnReason reason, @Nullable Consumer<T> function)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 givenLocationWorld.spawnEntity(@NotNull Location loc, @NotNull EntityType type)Creates a entity at the givenLocationWorld.spawnEntity(@NotNull Location loc, @NotNull EntityType type, CreatureSpawnEvent.SpawnReason reason)World.spawnEntity(@NotNull Location loc, @NotNull EntityType type, CreatureSpawnEvent.SpawnReason reason, @Nullable Consumer<Entity> function)World.spawnFallingBlock(@NotNull Location location, @NotNull BlockData data)World.spawnFallingBlock(@NotNull Location location, @NotNull MaterialData data)World.spawnFallingBlock(@NotNull Location location, @NotNull Material material, byte data)Deprecated.Magic valuevoidWorld.spawnParticle(@NotNull Particle particle, @NotNull Location location, int count)Spawns the particle (the number of times specified by count) at the target location.voidWorld.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.voidWorld.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> voidWorld.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> voidWorld.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> voidWorld.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> voidWorld.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)Strikes lightning at the givenLocationand possibly without soundWorld.strikeLightning(@NotNull Location loc)Strikes lightning at the givenLocationWorld.Spigot.strikeLightningEffect(@NotNull Location loc, boolean isSilent)Strikes lightning at the givenLocationwithout doing damage and possibly without soundWorld.strikeLightningEffect(@NotNull Location loc)Strikes lightning at the givenLocationwithout doing damageSubtracts the location by another.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. -
Uses of Location in org.bukkit.block
Methods in org.bukkit.block that return LocationModifier 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()Methods in org.bukkit.block with parameters of type LocationModifier and TypeMethodDescriptionBlock.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.voidEndGateway.setExitLocation(@Nullable Location location)Sets the exit location that entities are teleported to when they enter the gateway portal.voidSet the hive's flower location. -
Uses of Location in org.bukkit.boss
Methods in org.bukkit.boss that return LocationModifier and TypeMethodDescriptionDragonBattle.getEndPortalLocation()Get the location of the end portal. -
Uses of Location in org.bukkit.command
Methods in org.bukkit.command with parameters of type LocationModifier 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
Methods in org.bukkit.configuration that return LocationModifier and TypeMethodDescriptionConfigurationSection.getLocation(@NotNull String path)Gets the requested Location by path.ConfigurationSection.getLocation(@NotNull String path, @Nullable Location def)Gets the requestedLocationby path, returning a default value if not found.MemorySection.getLocation(@NotNull String path)MemorySection.getLocation(@NotNull String path, @Nullable Location def)Methods in org.bukkit.configuration with parameters of type Location -
Uses of Location in org.bukkit.entity
Methods in org.bukkit.entity that return LocationModifier and TypeMethodDescriptionEnderCrystal.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()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.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 locationEntity.getLocation()Entity.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.HumanEntity.getPotentialBedLocation()Gets the Location of the player's bed, null if they have not slept in one.default LocationFallingBlock.getSourceLoc()Deprecated.replaced byEntity.getOrigin()default LocationTNTPrimed.getSourceLoc()Deprecated.replaced byEntity.getOrigin()EnderSignal.getTargetLocation()Get the location this EnderSignal is moving towards.Methods in org.bukkit.entity with parameters of type LocationModifier and TypeMethodDescriptionEntity.getLocation(@Nullable Location loc)Stores the entity's current position in the provided Location object.booleanLivingEntity.hasLineOfSight(@NotNull Location location)Checks whether the living entity has block line of sight to the given block.voidInstruct this Mob to look at a specific LocationvoidInstruct 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.voidPlayer.playEffect(@NotNull Location loc, @NotNull Effect effect, int data)Deprecated.Magic value<T> voidPlayer.playEffect(@NotNull Location loc, @NotNull Effect effect, T data)Plays an effect to just this player.voidDeprecated.Magic valuevoidPlay a note for a player at a location.voidPlay a sound for a player at the location.voidPlayer.playSound(@NotNull Location location, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch)Play a sound for a player at the location.voidPlay a sound for a player at the location.voidPlayer.playSound(@NotNull Location location, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch)Play a sound for a player at the location.voidPlayer.sendBlockChange(@NotNull Location loc, @NotNull BlockData block)Send a block change.voidPlayer.sendBlockChange(@NotNull Location loc, @NotNull Material material, byte data)Deprecated.Magic valuevoidPlayer.sendBlockDamage(@NotNull Location loc, float progress)Send block damage.booleanPlayer.sendChunkChange(@NotNull Location loc, int sx, int sy, int sz, @org.jetbrains.annotations.NotNull byte[] data)Deprecated.Magic valuevoidPlayer.sendSignChange(@NotNull Location loc, @Nullable String[] lines)Deprecated.voidDeprecated.voidPlayer.sendSignChange(@NotNull Location loc, List<Component> lines)Send a sign change.voidSend a sign change.voidEnderCrystal.setBeamTarget(@Nullable Location location)Sets the location that this end crystal is pointing to.voidPlayer.setBedSpawnLocation(@Nullable Location location)Sets the Location where the player will spawn at their bed.voidPlayer.setBedSpawnLocation(@Nullable Location location, boolean force)Sets the Location where the player will spawn at their bed.voidPlayer.setCompassTarget(@NotNull Location loc)Set the target of the player's compass.voidSet the bee's flower location.voidSet the bee's hive location.voidSet the turtle's home locationvoidEnderSignal.setTargetLocation(@NotNull Location location)Set theLocationthis EnderSignal is moving towards.booleanAttempts to make the entity sleep at the given location.booleanAttempts to make this villager sleep at the given location.voidPlayer.spawnParticle(@NotNull Particle particle, @NotNull Location location, int count)Spawns the particle (the number of times specified by count) at the target location.voidPlayer.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.voidPlayer.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> voidPlayer.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> voidPlayer.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> voidPlayer.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.booleanTeleports this entity to the given location.booleanEntity.teleport(@NotNull Location location, @NotNull PlayerTeleportEvent.TeleportCause cause)Teleports this entity to the given location.default CompletableFuture<Boolean>Entity.teleportAsync(@NotNull Location loc)Loads/Generates(in 1.13+) the Chunk asynchronously, and then teleports the entity when the chunk is ready.default CompletableFuture<Boolean>Entity.teleportAsync(@NotNull Location loc, @NotNull PlayerTeleportEvent.TeleportCause cause)Loads/Generates(in 1.13+) the Chunk asynchronously, and then teleports the entity when the chunk is ready. -
Uses of Location in org.bukkit.entity.memory
Fields in org.bukkit.entity.memory with type parameters of type Location -
Uses of Location in org.bukkit.event.block
Methods in org.bukkit.event.block that return Location -
Uses of Location in org.bukkit.event.entity
Methods in org.bukkit.event.entity that return LocationModifier 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.EntityTeleportEvent.getTo()Gets the location that this entity moved toMethods in org.bukkit.event.entity with parameters of type LocationModifier and TypeMethodDescriptionvoidSets the location that this entity moved fromvoidSets the location that this entity moved toConstructors in org.bukkit.event.entity with parameters of type LocationModifierConstructorDescriptionEntityExplodeEvent(@NotNull Entity what, @NotNull Location location, @NotNull List<Block> blocks, float yield)EntityPortalEnterEvent(@NotNull Entity entity, @NotNull Location location)EntityPortalEvent(@NotNull Entity entity, @NotNull Location from, @Nullable Location to, int searchRadius)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
Methods in org.bukkit.event.player that return LocationModifier and TypeMethodDescriptionPlayerMoveEvent.getFrom()Gets the location this player moved fromPlayerInteractEvent.getInteractionPoint()The exact point at which the interaction occurred.PlayerRespawnEvent.getRespawnLocation()Gets the current respawn locationPlayerMoveEvent.getTo()Gets the location this player moved toMethods in org.bukkit.event.player with parameters of type LocationModifier and TypeMethodDescriptionvoidSets the location to mark as where the player moved fromvoidPlayerRespawnEvent.setRespawnLocation(@NotNull Location respawnLocation)Sets the new respawn locationvoidSets the location that this player will move toConstructors in org.bukkit.event.player with parameters of type LocationModifierConstructorDescriptionPlayerInteractEvent(@NotNull Player who, @NotNull Action action, @Nullable ItemStack item, @Nullable Block clickedBlock, @NotNull BlockFace clickedFace, @Nullable EquipmentSlot hand, @Nullable Location interactionPoint)PlayerPortalEvent(@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, ImmutableSet.Builder<PlayerRespawnEvent.RespawnFlag> respawnFlags)PlayerTeleportEvent(@NotNull Player player, @NotNull Location from, @Nullable Location to, @NotNull PlayerTeleportEvent.TeleportCause cause) -
Uses of Location in org.bukkit.event.server
Methods in org.bukkit.event.server that return LocationConstructors in org.bukkit.event.server with parameters of type LocationModifierConstructorDescriptionTabCompleteEvent(@NotNull CommandSender sender, @NotNull String buffer, @NotNull List<String> completions, boolean isCommand, Location location) -
Uses of Location in org.bukkit.event.vehicle
Methods in org.bukkit.event.vehicle that return LocationModifier and TypeMethodDescriptionVehicleMoveEvent.getFrom()Get the previous position.VehicleMoveEvent.getTo()Get the next position.Constructors in org.bukkit.event.vehicle with parameters of type Location -
Uses of Location in org.bukkit.event.world
Methods in org.bukkit.event.world that return LocationModifier and TypeMethodDescriptionStructureGrowEvent.getLocation()Gets the location of the structure.SpawnChangeEvent.getPreviousLocation()Gets the previous spawn locationConstructors in org.bukkit.event.world with parameters of type LocationModifierConstructorDescriptionSpawnChangeEvent(@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
Methods in org.bukkit.generator that return Location -
Uses of Location in org.bukkit.inventory
Methods in org.bukkit.inventory that return LocationModifier and TypeMethodDescriptionInventory.getLocation()Get the location of the block or entity which corresponds to this inventory. -
Uses of Location in org.bukkit.inventory.meta
Methods in org.bukkit.inventory.meta that return LocationModifier and TypeMethodDescriptionCompassMeta.getLodestone()Gets the location that this compass will point to.Methods in org.bukkit.inventory.meta with parameters of type LocationModifier and TypeMethodDescriptionvoidCompassMeta.setLodestone(@Nullable Location lodestone)Sets the location this lodestone compass will point to. -
Uses of Location in org.bukkit.loot
Methods in org.bukkit.loot that return LocationModifier and TypeMethodDescriptionLootContext.getLocation()TheLocationto store where the loot will be generated.Constructors in org.bukkit.loot with parameters of type LocationModifierConstructorDescriptionCreates a new LootContext.Builder instance to facilitate easy creation ofLootContexts. -
Uses of Location in org.bukkit.util
Methods in org.bukkit.util that return LocationModifier and TypeMethodDescriptionVector.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.Methods in org.bukkit.util with parameters of type LocationModifier and TypeMethodDescriptionstatic @NotNull BoundingBoxCreates a new bounding box using the given center and extents.static @NotNull BoundingBoxCreates 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.Constructors in org.bukkit.util with parameters of type LocationModifierConstructorDescriptionBlockIterator(@NotNull Location loc)Constructs the BlockIterator.BlockIterator(@NotNull Location loc, double yOffset)Constructs the BlockIterator.BlockIterator(@NotNull Location loc, double yOffset, int maxDistance)Constructs the BlockIterator. -
Uses of Location in org.spigotmc.event.player
Methods in org.spigotmc.event.player that return LocationModifier and TypeMethodDescriptionPlayerSpawnLocationEvent.getSpawnLocation()Gets player's spawn location.Methods in org.spigotmc.event.player with parameters of type LocationModifier and TypeMethodDescriptionvoidPlayerSpawnLocationEvent.setSpawnLocation(@NotNull Location location)Sets player's spawn location.Constructors in org.spigotmc.event.player with parameters of type LocationModifierConstructorDescriptionPlayerSpawnLocationEvent(@NotNull Player who, @NotNull Location spawnLocation)
toHighestLocation(HeightMap)