public class CuboidArea extends Area implements ConfigSerialization.StringSerializable, java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
BlockLocation |
pos1
The first position of this CuboidArea, containing the minX, minY and minZ coordinates
|
BlockLocation |
pos2
The second position of this CuboidArea, containing the maxX, maxY and maxZ coordinates
|
Constructor and Description |
---|
CuboidArea()
Constructs a new not properly set up CuboidArea
|
CuboidArea(BlockLocation pos1,
BlockLocation pos2) |
CuboidArea(LocationData pos1,
LocationData pos2) |
CuboidArea(java.lang.String in)
Constructs a new CuboidArea from the given String
|
CuboidArea(java.lang.String world,
BlockLocation pos1,
BlockLocation pos2) |
Modifier and Type | Method and Description |
---|---|
CuboidArea |
add(int x,
int y,
int z) |
CuboidArea |
clone()
Makes a clone of the CuboidArea by keeping all of it's properties
|
CuboidArea |
cloneFixed()
Makes a clone of this CuboidArea and fixes it's pos1 and pos2 using the @see fix method
|
boolean |
contains(org.bukkit.block.Block loc) |
boolean |
contains(BlockLocation loc) |
boolean |
contains(int x,
int z) |
boolean |
contains(org.bukkit.Location loc) |
boolean |
contains(LocationData loc) |
void |
fix()
Fix the min and max points for ensuring that the pos1 contains the minX, minY and minZ, while
the pos2 contains the maxX, maxY and maxZ and they does not contain these informations oppositely
|
java.util.List<org.bukkit.block.Block> |
getBlocks(org.bukkit.World w) |
LocationData |
getCenter() |
java.util.List<org.bukkit.block.Block> |
getOutlineBlocks(org.bukkit.World w) |
boolean |
isBorder(int x,
int z) |
boolean |
isDefined() |
org.bukkit.Location |
randomLoc() |
org.bukkit.Location |
randomLoc(org.bukkit.World w) |
static void |
resetOutlineBlock(org.bukkit.block.Block block,
org.bukkit.entity.Player plr) |
int |
size() |
CuboidArea |
subtract(int x,
int y,
int z) |
java.lang.String |
toString() |
UnlimitedYArea |
toUnlimitedYArea()
Converts this CuboidArea to an @see UnlimitedYArea
|
getBlocks, getOutlineBlocks, resetOutlineWithBlock, showOutlineWithBlock
public BlockLocation pos1
public BlockLocation pos2
public CuboidArea()
public CuboidArea(java.lang.String in)
in
- - The String from which the CuboidArea should be constructed
Accepted input String formats:
world
minX minY minZ maxX maxY maxZ
world minX minY minZ maxX maxY maxZpublic CuboidArea(java.lang.String world, BlockLocation pos1, BlockLocation pos2)
public CuboidArea(LocationData pos1, LocationData pos2)
public CuboidArea(BlockLocation pos1, BlockLocation pos2)
public static void resetOutlineBlock(org.bukkit.block.Block block, org.bukkit.entity.Player plr)
public CuboidArea add(int x, int y, int z)
public CuboidArea clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in interface ConfigSerialization.StringSerializable
toString
in class java.lang.Object
public CuboidArea cloneFixed()
public boolean contains(org.bukkit.Location loc)
public boolean contains(org.bukkit.block.Block loc)
public boolean contains(LocationData loc)
public boolean contains(BlockLocation loc)
public boolean contains(int x, int z)
public void fix()
public java.util.List<org.bukkit.block.Block> getBlocks(org.bukkit.World w)
public LocationData getCenter()
public java.util.List<org.bukkit.block.Block> getOutlineBlocks(org.bukkit.World w)
getOutlineBlocks
in class Area
public boolean isBorder(int x, int z)
public boolean isDefined()
public org.bukkit.Location randomLoc(org.bukkit.World w)
public org.bukkit.Location randomLoc()
public int size()
public CuboidArea subtract(int x, int y, int z)
public UnlimitedYArea toUnlimitedYArea()