Uses of Class
org.bukkit.Location
-
Packages that use Location Package Description org.bukkit More generalized classes in the API.org.bukkit.block Classes used to manipulate the voxels in aworld, including special states.org.bukkit.command Classes relating to handling specialized non-chat player input.org.bukkit.configuration Classes dedicated to handling a plugin's runtime configuration.org.bukkit.entity Interfaces for non-voxel objects that can exist in aworld, including all players, monsters, projectiles, etc.org.bukkit.entity.memory org.bukkit.event.block org.bukkit.event.entity org.bukkit.event.player org.bukkit.event.vehicle Eventsrelating tovehicular entities.org.bukkit.event.world org.bukkit.generator Classes to facilitateworldgeneration implementation.org.bukkit.inventory Classes involved in manipulating player inventories and item interactions.org.bukkit.loot org.bukkit.util Multi and single purpose classes to facilitate various programmatic concepts.org.spigotmc.event.player -
-
Uses of Location in org.bukkit
Methods in org.bukkit that return Location Modifier and Type Method Description LocationLocation. add(double x, double y, double z)Adds the location by another.LocationLocation. add(Location vec)Adds the location by another.LocationLocation. add(Vector vec)Adds the location by a vector.LocationLocation. clone()static LocationLocation. deserialize(Map<String,Object> args)Required method for deserializationLocationOfflinePlayer. 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.LocationWorldBorder. getCenter()Gets the current border center.LocationRaid. getLocation()Gets the center location where the raid occurs.LocationWorld. getSpawnLocation()Gets the default spawnLocationof this worldLocationWorld. locateNearestStructure(Location origin, StructureType structureType, int radius, boolean findUnexplored)Find the closest nearby structure of a givenStructureType.LocationLocation. multiply(double m)Performs scalar multiplication, multiplying all components with a scalar.LocationLocation. setDirection(Vector vector)LocationLocation. subtract(double x, double y, double z)Subtracts the location by another.LocationLocation. subtract(Location vec)Subtracts the location by another.LocationLocation. subtract(Vector vec)Subtracts the location by a vector.LocationLocation. zero()Zero this location's components.Methods in org.bukkit with parameters of type Location Modifier and Type Method Description LocationLocation. add(Location vec)Adds the location by another.static ItemStackBukkit. createExplorerMap(World world, Location location, StructureType structureType)Create a new explorer map targeting the closest nearby structure of a givenStructureType.static ItemStackBukkit. createExplorerMap(World world, Location location, StructureType structureType, int radius, boolean findUnexplored)Create a new explorer map targeting the closest nearby structure of a givenStructureType.ItemStackServer. createExplorerMap(World world, Location location, StructureType structureType)Create a new explorer map targeting the closest nearby structure of a givenStructureType.ItemStackServer. createExplorerMap(World world, Location location, StructureType structureType, int radius, boolean findUnexplored)Create a new explorer map targeting the closest nearby structure of a givenStructureType.booleanWorld. createExplosion(Location loc, float power)Creates explosion at given coordinates with given powerbooleanWorld. createExplosion(Location loc, float power, boolean setFire)Creates explosion at given coordinates with given power and optionally setting blocks on fire.booleanWorld. createExplosion(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(Location loc, float power, boolean setFire, boolean breakBlocks, Entity source)Creates explosion at given coordinates with given power and optionally setting blocks on fire or breaking blocks.doubleLocation. distance(Location o)Get the distance between this location and another.doubleLocation. distanceSquared(Location o)Get the squared distance between this location and another.ItemWorld. dropItem(Location location, ItemStack item)Drops an item at the specifiedLocationItemWorld. dropItemNaturally(Location location, ItemStack item)Drops an item at the specifiedLocationwith a random offsetbooleanWorld. generateTree(Location location, TreeType type)Creates a tree at the givenLocationbooleanWorld. generateTree(Location loc, TreeType type, BlockChangeDelegate delegate)Creates a tree at the givenLocationBlockWorld. getBlockAt(Location location)ChunkWorld. getChunkAt(Location location)BlockWorld. getHighestBlockAt(Location location)Gets the lowest block at the givenLocationsuch that the block and all blocks above it are transparent for lighting purposes.intWorld. getHighestBlockYAt(Location location)Gets the y coordinate of the lowest block at the givenLocationsuch that the block and all blocks above it are transparent for lighting purposes.Collection<Entity>World. getNearbyEntities(Location location, double x, double y, double z)Returns a list of entities within a bounding box centered around a Location.Collection<Entity>World. getNearbyEntities(Location location, double x, double y, double z, Predicate<Entity> filter)Returns a list of entities within a bounding box centered around a Location.booleanWorldBorder. isInside(Location location)Check if the specified location is inside this border.RaidWorld. locateNearestRaid(Location location, int radius)Finds the nearest raid close to the given location.LocationWorld. locateNearestStructure(Location origin, StructureType structureType, int radius, boolean findUnexplored)Find the closest nearby structure of a givenStructureType.voidWorld. playEffect(Location location, Effect effect, int data)Plays an effect to all players within a default radius around a given location.voidWorld. playEffect(Location location, Effect effect, int data, int radius)Plays an effect to all players within a given radius around a location.<T> voidWorld. playEffect(Location location, Effect effect, T data)Plays an effect to all players within a default radius around a given location.<T> voidWorld. playEffect(Location location, Effect effect, T data, int radius)Plays an effect to all players within a given radius around a location.voidWorld. playSound(Location location, String sound, float volume, float pitch)Play a Sound at the provided Location in the World.voidWorld. playSound(Location location, String sound, SoundCategory category, float volume, float pitch)Play a Sound at the provided Location in the World.voidWorld. playSound(Location location, Sound sound, float volume, float pitch)Play a Sound at the provided Location in the WorldvoidWorld. playSound(Location location, Sound sound, SoundCategory category, float volume, float pitch)Play a Sound at the provided Location in the World.RayTraceResultWorld. rayTrace(Location start, Vector direction, double maxDistance, FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks, double raySize, Predicate<Entity> filter)Performs a ray trace that checks for both block and entity collisions.RayTraceResultWorld. rayTraceBlocks(Location start, Vector direction, double maxDistance)Performs a ray trace that checks for block collisions using the blocks' precise collision shapes.RayTraceResultWorld. rayTraceBlocks(Location start, Vector direction, double maxDistance, FluidCollisionMode fluidCollisionMode)Performs a ray trace that checks for block collisions using the blocks' precise collision shapes.RayTraceResultWorld. rayTraceBlocks(Location start, Vector direction, double maxDistance, FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks)Performs a ray trace that checks for block collisions using the blocks' precise collision shapes.RayTraceResultWorld. rayTraceEntities(Location start, Vector direction, double maxDistance)Performs a ray trace that checks for entity collisions.RayTraceResultWorld. rayTraceEntities(Location start, Vector direction, double maxDistance, double raySize)Performs a ray trace that checks for entity collisions.RayTraceResultWorld. rayTraceEntities(Location start, Vector direction, double maxDistance, double raySize, Predicate<Entity> filter)Performs a ray trace that checks for entity collisions.RayTraceResultWorld. rayTraceEntities(Location start, Vector direction, double maxDistance, Predicate<Entity> filter)Performs a ray trace that checks for entity collisions.voidWorldBorder. setCenter(Location location)Sets the new border center.booleanWorld. setSpawnLocation(Location location)Sets the spawn location of the world.<T extends Entity>
TWorld. spawn(Location location, Class<T> clazz)Spawn an entity of a specific class at the givenLocation<T extends Entity>
TWorld. spawn(Location location, Class<T> clazz, Consumer<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.ArrowWorld. spawnArrow(Location location, Vector direction, float speed, float spread)<T extends AbstractArrow>
TWorld. spawnArrow(Location location, Vector direction, float speed, float spread, Class<T> clazz)Creates an arrow entity of the given class at the givenLocationEntityWorld. spawnEntity(Location loc, EntityType type)Creates a entity at the givenLocationFallingBlockWorld. spawnFallingBlock(Location location, BlockData data)FallingBlockWorld. spawnFallingBlock(Location location, MaterialData data)FallingBlockWorld. spawnFallingBlock(Location location, Material material, byte data)Deprecated.Magic valuevoidWorld. spawnParticle(Particle particle, Location location, int count)Spawns the particle (the number of times specified by count) at the target location.voidWorld. spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ)Spawns the particle (the number of times specified by count) at the target location.voidWorld. spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra)Spawns the particle (the number of times specified by count) at the target location.<T> voidWorld. spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data)Spawns the particle (the number of times specified by count) at the target location.<T> voidWorld. spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force)Spawns the particle (the number of times specified by count) at the target location.<T> voidWorld. spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, T data)Spawns the particle (the number of times specified by count) at the target location.<T> voidWorld. spawnParticle(Particle particle, Location location, int count, T data)Spawns the particle (the number of times specified by count) at the target location.LightningStrikeWorld.Spigot. strikeLightning(Location loc, boolean isSilent)Strikes lightning at the givenLocationand possibly without soundLightningStrikeWorld. strikeLightning(Location loc)Strikes lightning at the givenLocationLightningStrikeWorld.Spigot. strikeLightningEffect(Location loc, boolean isSilent)Strikes lightning at the givenLocationwithout doing damage and possibly without soundLightningStrikeWorld. strikeLightningEffect(Location loc)Strikes lightning at the givenLocationwithout doing damageLocationLocation. subtract(Location vec)Subtracts the location by another. -
Uses of Location in org.bukkit.block
Methods in org.bukkit.block that return Location Modifier and Type Method Description LocationEndGateway. getExitLocation()Gets the location that entities are teleported to when entering the gateway portal.LocationBlock. getLocation()Gets the Location of the blockLocationBlock. getLocation(Location loc)Stores the location of the block in the provided Location object.LocationBlockState. getLocation()Gets the location of this block state.LocationBlockState. getLocation(Location loc)Stores the location of this block state in the provided Location object.LocationDoubleChest. getLocation()Methods in org.bukkit.block with parameters of type Location Modifier and Type Method Description LocationBlock. getLocation(Location loc)Stores the location of the block in the provided Location object.LocationBlockState. getLocation(Location loc)Stores the location of this block state in the provided Location object.RayTraceResultBlock. rayTrace(Location start, Vector direction, double maxDistance, FluidCollisionMode fluidCollisionMode)Performs a ray trace that checks for collision with this specific block in its current state using its precise collision shape.voidEndGateway. setExitLocation(Location location)Sets the exit location that entities are teleported to when they enter the gateway portal. -
Uses of Location in org.bukkit.command
Methods in org.bukkit.command with parameters of type Location Modifier and Type Method Description List<String>Command. tabComplete(CommandSender sender, String alias, String[] args, Location location)Executed on tab completion for this command, returning a list of options the player can tab through.List<String>CommandMap. tabComplete(CommandSender sender, String cmdLine, Location location)Looks for the requested command and executes an appropriate tab-completer if found.List<String>SimpleCommandMap. tabComplete(CommandSender sender, String cmdLine, Location location) -
Uses of Location in org.bukkit.configuration
Methods in org.bukkit.configuration that return Location Modifier and Type Method Description LocationConfigurationSection. getLocation(String path)Gets the requested Location by path.LocationConfigurationSection. getLocation(String path, Location def)Gets the requestedLocationby path, returning a default value if not found.LocationMemorySection. getLocation(String path)LocationMemorySection. getLocation(String path, Location def)Methods in org.bukkit.configuration with parameters of type Location Modifier and Type Method Description LocationConfigurationSection. getLocation(String path, Location def)Gets the requestedLocationby path, returning a default value if not found.LocationMemorySection. getLocation(String path, Location def) -
Uses of Location in org.bukkit.entity
Methods in org.bukkit.entity that return Location Modifier and Type Method Description LocationEnderCrystal. getBeamTarget()Gets the location that this end crystal is pointing its beam to.LocationHumanEntity. getBedLocation()Gets the location of the bed the player is currently sleeping inLocationHumanEntity. 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.LocationPlayer. getCompassTarget()Get the previously set compass target.LocationLivingEntity. getEyeLocation()Get a Location detailing the current eye position of the living entity.LocationEntity. getLocation()Gets the entity's current positionLocationEntity. getLocation(Location loc)Stores the entity's current position in the provided Location object.LocationEnderSignal. getTargetLocation()Get the location this EnderSignal is moving towards.Methods in org.bukkit.entity with parameters of type Location Modifier and Type Method Description LocationEntity. getLocation(Location loc)Stores the entity's current position in the provided Location object.InventoryViewHumanEntity. openEnchanting(Location location, boolean force)Opens an empty enchanting inventory window with the player's inventory on the bottom.InventoryViewHumanEntity. openWorkbench(Location location, boolean force)Opens an empty workbench inventory window with the player's inventory on the bottom.voidPlayer. playEffect(Location loc, Effect effect, int data)Deprecated.Magic value<T> voidPlayer. playEffect(Location loc, Effect effect, T data)Plays an effect to just this player.voidPlayer. playNote(Location loc, byte instrument, byte note)Deprecated.Magic valuevoidPlayer. playNote(Location loc, Instrument instrument, Note note)Play a note for a player at a location.voidPlayer. playSound(Location location, String sound, float volume, float pitch)Play a sound for a player at the location.voidPlayer. playSound(Location location, String sound, SoundCategory category, float volume, float pitch)Play a sound for a player at the location.voidPlayer. playSound(Location location, Sound sound, float volume, float pitch)Play a sound for a player at the location.voidPlayer. playSound(Location location, Sound sound, SoundCategory category, float volume, float pitch)Play a sound for a player at the location.voidPlayer. sendBlockChange(Location loc, BlockData block)Send a block change.voidPlayer. sendBlockChange(Location loc, Material material, byte data)Deprecated.Magic valuebooleanPlayer. sendChunkChange(Location loc, int sx, int sy, int sz, byte[] data)Deprecated.Magic valuevoidPlayer. sendSignChange(Location loc, String[] lines)Send a sign change.voidPlayer. sendSignChange(Location loc, String[] lines, DyeColor dyeColor)Send a sign change.voidEnderCrystal. setBeamTarget(Location location)Sets the location that this end crystal is pointing to.voidHumanEntity. setBedSpawnLocation(Location location)Sets the Location where the player will spawn at their bed.voidHumanEntity. setBedSpawnLocation(Location location, boolean force)Sets the Location where the player will spawn at their bed.voidPlayer. setCompassTarget(Location loc)Set the target of the player's compass.voidEnderSignal. setTargetLocation(Location location)Set theLocationthis EnderSignal is moving towards.booleanHumanEntity. sleep(Location location, boolean force)Attempts to make the entity sleep at the given location.booleanVillager. sleep(Location location)Attempts to make this villager sleep at the given location.voidPlayer. spawnParticle(Particle particle, Location location, int count)Spawns the particle (the number of times specified by count) at the target location.voidPlayer. spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ)Spawns the particle (the number of times specified by count) at the target location.voidPlayer. spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra)Spawns the particle (the number of times specified by count) at the target location.<T> voidPlayer. spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data)Spawns the particle (the number of times specified by count) at the target location.<T> voidPlayer. spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, T data)Spawns the particle (the number of times specified by count) at the target location.<T> voidPlayer. spawnParticle(Particle particle, Location location, int count, T data)Spawns the particle (the number of times specified by count) at the target location.booleanEntity. teleport(Location location)Teleports this entity to the given location.booleanEntity. teleport(Location location, PlayerTeleportEvent.TeleportCause cause)Teleports this entity to the given location. -
Uses of Location in org.bukkit.entity.memory
Fields in org.bukkit.entity.memory with type parameters of type Location Modifier and Type Field Description static MemoryKey<Location>MemoryKey. HOMEstatic MemoryKey<Location>MemoryKey. JOB_SITEstatic MemoryKey<Location>MemoryKey. MEETING_POINT -
Uses of Location in org.bukkit.event.block
Methods in org.bukkit.event.block that return Location Modifier and Type Method Description LocationBlockPistonRetractEvent. getRetractLocation()Deprecated. -
Uses of Location in org.bukkit.event.entity
Methods in org.bukkit.event.entity that return Location Modifier and Type Method Description LocationEntityTeleportEvent. getFrom()Gets the location that this entity moved fromLocationEntityExplodeEvent. getLocation()Returns the location where the explosion happened.LocationEntityPortalEnterEvent. getLocation()Gets the portal block the entity is touchingLocationEntitySpawnEvent. getLocation()Gets the location at which the entity is spawning.LocationItemDespawnEvent. getLocation()Gets the location at which the item is despawning.LocationEntityTeleportEvent. getTo()Gets the location that this entity moved toMethods in org.bukkit.event.entity with parameters of type Location Modifier and Type Method Description voidEntityTeleportEvent. setFrom(Location from)Sets the location that this entity moved fromvoidEntityTeleportEvent. setTo(Location to)Sets the location that this entity moved toConstructors in org.bukkit.event.entity with parameters of type Location Constructor Description EntityExplodeEvent(Entity what, Location location, List<Block> blocks, float yield)EntityPortalEnterEvent(Entity entity, Location location)EntityPortalEvent(Entity entity, Location from, Location to)EntityPortalExitEvent(Entity entity, Location from, Location to, Vector before, Vector after)EntityTeleportEvent(Entity what, Location from, Location to)ItemDespawnEvent(Item despawnee, Location loc)ItemSpawnEvent(Item spawnee, Location loc)Deprecated. -
Uses of Location in org.bukkit.event.player
Methods in org.bukkit.event.player that return Location Modifier and Type Method Description LocationPlayerMoveEvent. getFrom()Gets the location this player moved fromLocationPlayerRespawnEvent. getRespawnLocation()Gets the current respawn locationLocationPlayerMoveEvent. getTo()Gets the location this player moved toMethods in org.bukkit.event.player with parameters of type Location Modifier and Type Method Description voidPlayerMoveEvent. setFrom(Location from)Sets the location to mark as where the player moved fromvoidPlayerRespawnEvent. setRespawnLocation(Location respawnLocation)Sets the new respawn locationvoidPlayerMoveEvent. setTo(Location to)Sets the location that this player will move toConstructors in org.bukkit.event.player with parameters of type Location Constructor Description PlayerMoveEvent(Player player, Location from, Location to)PlayerPortalEvent(Player player, Location from, Location to)PlayerPortalEvent(Player player, Location from, Location to, PlayerTeleportEvent.TeleportCause cause)PlayerRespawnEvent(Player respawnPlayer, Location respawnLocation, boolean isBedSpawn)PlayerTeleportEvent(Player player, Location from, Location to)PlayerTeleportEvent(Player player, Location from, Location to, PlayerTeleportEvent.TeleportCause cause) -
Uses of Location in org.bukkit.event.vehicle
Methods in org.bukkit.event.vehicle that return Location Modifier and Type Method Description LocationVehicleMoveEvent. getFrom()Get the previous position.LocationVehicleMoveEvent. getTo()Get the next position.Constructors in org.bukkit.event.vehicle with parameters of type Location Constructor Description VehicleMoveEvent(Vehicle vehicle, Location from, Location to) -
Uses of Location in org.bukkit.event.world
Methods in org.bukkit.event.world that return Location Modifier and Type Method Description LocationStructureGrowEvent. getLocation()Gets the location of the structure.LocationSpawnChangeEvent. getPreviousLocation()Gets the previous spawn locationConstructors in org.bukkit.event.world with parameters of type Location Constructor Description SpawnChangeEvent(World world, Location previousLocation)StructureGrowEvent(Location location, TreeType species, boolean bonemeal, Player player, List<BlockState> blocks) -
Uses of Location in org.bukkit.generator
Methods in org.bukkit.generator that return Location Modifier and Type Method Description LocationChunkGenerator. getFixedSpawnLocation(World world, Random random)Gets a fixed spawn location to use for a given world. -
Uses of Location in org.bukkit.inventory
Methods in org.bukkit.inventory that return Location Modifier and Type Method Description LocationInventory. getLocation()Get the location of the block or entity which corresponds to this inventory. -
Uses of Location in org.bukkit.loot
Methods in org.bukkit.loot that return Location Modifier and Type Method Description LocationLootContext. getLocation()TheLocationto store where the loot will be generated.Constructors in org.bukkit.loot with parameters of type Location Constructor Description Builder(Location location)Creates a new LootContext.Builder instance to facilitate easy creation ofLootContexts. -
Uses of Location in org.bukkit.util
Methods in org.bukkit.util that return Location Modifier and Type Method Description LocationVector. toLocation(World world)Gets a Location version of this vector with yaw and pitch being 0.LocationVector. toLocation(World world, float yaw, float pitch)Gets a Location version of this vector.Methods in org.bukkit.util with parameters of type Location Modifier and Type Method Description static BoundingBoxBoundingBox. of(Location center, double x, double y, double z)Creates a new bounding box using the given center and extents.static BoundingBoxBoundingBox. of(Location corner1, Location corner2)Creates a new bounding box using the coordinates of the given locations as corners.BoundingBoxBoundingBox. shift(Location shift)Shifts this bounding box by the given amounts.BoundingBoxBoundingBox. union(Location position)Expands this bounding box to contain (or border) the specified position.Constructors in org.bukkit.util with parameters of type Location Constructor Description BlockIterator(Location loc)Constructs the BlockIterator.BlockIterator(Location loc, double yOffset)Constructs the BlockIterator.BlockIterator(Location loc, double yOffset, int maxDistance)Constructs the BlockIterator. -
Uses of Location in org.spigotmc.event.player
Methods in org.spigotmc.event.player that return Location Modifier and Type Method Description LocationPlayerSpawnLocationEvent. getSpawnLocation()Gets player's spawn location.Methods in org.spigotmc.event.player with parameters of type Location Modifier and Type Method Description voidPlayerSpawnLocationEvent. setSpawnLocation(Location location)Sets player's spawn location.Constructors in org.spigotmc.event.player with parameters of type Location Constructor Description PlayerSpawnLocationEvent(Player who, Location spawnLocation)
-