public class BlockLocation extends Object
Constructor and Description |
---|
BlockLocation(org.bukkit.block.Block block)
Initializes a new Block Location using a Block
|
BlockLocation(ConfigurationNode node)
Initializes a new Block Location using the data in the configuration node
|
BlockLocation(org.bukkit.Location location)
Initializes a new Block Location using a Location
|
BlockLocation(String world,
int x,
int y,
int z)
Initializes a new Block Location using a world and x/y/z coordinate
|
BlockLocation(String world,
IntVector3 coordinates)
Initializes a new Block Location usinga world and coordinates pair
|
BlockLocation(org.bukkit.World world,
int x,
int y,
int z)
Initializes a new Block Location using a world and x/y/z coordinate
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object) |
org.bukkit.block.Block |
getBlock()
Gets the Block this Location is in
|
org.bukkit.Chunk |
getChunk()
Gets the chunk this Block Location is in
Will load the chunk if it isn't loaded |
IntVector3 |
getCoordinates()
Gets the x/y/z coordinates of this Block Location as an IntVector3
|
org.bukkit.Location |
getLocation()
Gets the Location from this Block Location
|
org.bukkit.World |
getWorld()
Gets the World this Location is in
|
int |
hashCode() |
boolean |
isIn(BlockLocation point1,
BlockLocation point2)
Checks if this Block Location is within the boundaries of a cuboid
|
boolean |
isIn(org.bukkit.Chunk chunk)
Checks if this Block Location is within the boundaries of a chunk
|
boolean |
isIn(org.bukkit.World world)
Checks if this Location is in the World specified
|
boolean |
isLoaded()
Checks if this location is loaded
|
static BlockLocation |
parseLocation(String value)
Tries to parse a Block Location from a String value
|
void |
save(ConfigurationNode node) |
String |
toString() |
public final int x
public final int y
public final int z
public final String world
public BlockLocation(ConfigurationNode node)
node
- to usepublic BlockLocation(org.bukkit.block.Block block)
block
- to usepublic BlockLocation(org.bukkit.Location location)
location
- to usepublic BlockLocation(org.bukkit.World world, int x, int y, int z)
world
- to use the name ofx
- - coordinatey
- - coordinatez
- - coordinatepublic BlockLocation(String world, int x, int y, int z)
world
- name to usex
- - coordinatey
- - coordinatez
- - coordinatepublic BlockLocation(String world, IntVector3 coordinates)
world
- name to usecoordinates
- to usepublic static BlockLocation parseLocation(String value)
value
- to parsepublic org.bukkit.Chunk getChunk()
public IntVector3 getCoordinates()
public org.bukkit.Location getLocation()
public org.bukkit.block.Block getBlock()
public org.bukkit.World getWorld()
public boolean isLoaded()
public boolean isIn(org.bukkit.World world)
world
- to checkpublic boolean isIn(org.bukkit.Chunk chunk)
chunk
- to checkpublic boolean isIn(BlockLocation point1, BlockLocation point2)
point1
- of the Cuboidpoint2
- of the Cuboidpublic void save(ConfigurationNode node)
Copyright © 2019. All rights reserved.