Class Cuboid
java.lang.Object
ml.karmaconfigs.api.bukkit.region.Cuboid
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Region
Karma cuboid region
Code from:
https://www.spigotmc.org/threads/region-cuboid.329859/
- See Also:
- Serialized Form
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanexists(KarmaPlugin plugin)Get if the region already existsabstract Iterator<org.bukkit.block.Block>Get the region blocksabstract intGet the amount of blocks inside the regionabstract org.bukkit.LocationGet the bottom locationabstract CornerGet the bottom corners of the regionabstract org.bukkit.LocationGet the region center locationabstract intGet the region heightabstract StringGet the region internal nameabstract intGet the region lengthabstract StringgetName()Get the region nameGet all the regionsabstract doublegetSize()Get the region sizeabstract doubleGet the region sizeabstract StringgetToken()Get the region token, this is another unique identifier for the region ( UUID is also used as identifier ).abstract org.bukkit.LocationgetTop()Get the top locationabstract CornerGet the top corners of the regionabstract UUIDGet the region unique idabstract WallGet the region wallsabstract intgetWidth()Get the region widthabstract org.bukkit.WorldgetWorld()Get the region worldabstract booleanisInside(org.bukkit.block.Block block)Get if the block is inside the regionabstract booleanisInside(org.bukkit.entity.Entity entity)Get if the entity is inside the regionabstract booleanisInside(org.bukkit.entity.Entity entity, double marge)Get if the entity is inside the regionabstract voidsaveToMemory(KarmaPlugin owner)Save the region to memory WARNING: THIS METHOD SHOULD CONTAIN Aexists(KarmaPlugin)CHECK BEFORE BEING PROCESSED, OTHERWISE EXISTING REGION WILL BE OVERWRITTEN
-
Constructor Details
-
Cuboid
Initialize the cuboid region- Parameters:
plugin- the cuboid owner
-
-
Method Details
-
getUniqueId
Get the region unique id- Returns:
- the region unique id
-
getName
Get the region name- Returns:
- the region name
-
getInternalName
Get the region internal name- Returns:
- the region internal name
-
exists
Get if the region already exists- Parameters:
plugin- the region owner- Returns:
- if the region already exists
-
getBlocks
Get the region blocks- Returns:
- the region blocks
-
getCenter
public abstract org.bukkit.Location getCenter()Get the region center location- Returns:
- the region center location
-
getSize
public abstract double getSize()Get the region size- Returns:
- the region size
-
getSizeSquared
public abstract double getSizeSquared()Get the region size- Returns:
- the region size
-
getTop
public abstract org.bukkit.Location getTop()Get the top location- Returns:
- the top location
-
getBottom
public abstract org.bukkit.Location getBottom()Get the bottom location- Returns:
- the bottom location
-
getWorld
public abstract org.bukkit.World getWorld()Get the region world- Returns:
- the region world
-
getBlocksAmount
public abstract int getBlocksAmount()Get the amount of blocks inside the region- Returns:
- the region blocks
-
getHeight
public abstract int getHeight()Get the region height- Returns:
- the region height
-
getWidth
public abstract int getWidth()Get the region width- Returns:
- the region width
-
getLength
public abstract int getLength()Get the region length- Returns:
- the region length
-
isInside
public abstract boolean isInside(org.bukkit.entity.Entity entity)Get if the entity is inside the region- Parameters:
entity- the entity- Returns:
- if the entity is inside the region
-
isInside
public abstract boolean isInside(org.bukkit.block.Block block)Get if the block is inside the region- Parameters:
block- the block- Returns:
- if the block is inside the region
-
isInside
public abstract boolean isInside(org.bukkit.entity.Entity entity, double marge)Get if the entity is inside the region- Parameters:
entity- the entitymarge- the marge out of region frontier- Returns:
- if the entity is inside the region
-
getToken
Get the region token, this is another unique identifier for the region ( UUID is also used as identifier ). The difference between this one and UUID one is that this token is randomly generated, and UUID name-base generated- Returns:
- the region token
-
getTopCorners
Get the top corners of the region- Returns:
- the top region corners
-
getBottomCorners
Get the bottom corners of the region- Returns:
- the bottom region corners
-
getWalls
Get the region walls- Parameters:
type- the wall type- Returns:
- the region walls
-
saveToMemory
Save the region to memory WARNING: THIS METHOD SHOULD CONTAIN Aexists(KarmaPlugin)CHECK BEFORE BEING PROCESSED, OTHERWISE EXISTING REGION WILL BE OVERWRITTEN- Parameters:
owner- the region owner
-
getRegions
Get all the regions- Returns:
- the regions
-