Class Region
java.lang.Object
me.fami6xx.rpuniverse.core.regions.Region
Represents a region (cuboid) with two corners.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.LocationGets the first corner of the region.org.bukkit.LocationGets the second corner of the region.org.bukkit.LocationHelper to get the maximum corner for x, y, z.org.bukkit.LocationHelper to get the minimum corner for x, y, z.getName()Gets the name of the region.Gets the unique ID of the region.voidsetCorner1(org.bukkit.Location corner1)Sets the first corner of the region.voidsetCorner2(org.bukkit.Location corner2)Sets the second corner of the region.voidSets the name of the region.
-
Constructor Details
-
Region
Create a new Region.- Parameters:
name- Region's namecorner1- First corner (Location)corner2- Second corner (Location)
-
Region
public Region(UUID regionId, String name, org.bukkit.Location corner1, org.bukkit.Location corner2)Used by Gson or internal re-creation when loading from disk.- Parameters:
regionId- Unique ID for the regionname- Region's namecorner1- First corner (Location)corner2- Second corner (Location)
-
-
Method Details
-
getRegionId
Gets the unique ID of the region.- Returns:
- the unique ID of the region
-
getName
Gets the name of the region.- Returns:
- the name of the region
-
setName
Sets the name of the region.- Parameters:
name- the new name of the region
-
getCorner1
public org.bukkit.Location getCorner1()Gets the first corner of the region.- Returns:
- the first corner of the region
-
setCorner1
public void setCorner1(org.bukkit.Location corner1)Sets the first corner of the region.- Parameters:
corner1- the new first corner of the region
-
getCorner2
public org.bukkit.Location getCorner2()Gets the second corner of the region.- Returns:
- the second corner of the region
-
setCorner2
public void setCorner2(org.bukkit.Location corner2)Sets the second corner of the region.- Parameters:
corner2- the new second corner of the region
-
getMinCorner
public org.bukkit.Location getMinCorner()Helper to get the minimum corner for x, y, z.- Returns:
- the minimum corner for x, y, z
-
getMaxCorner
public org.bukkit.Location getMaxCorner()Helper to get the maximum corner for x, y, z.- Returns:
- the maximum corner for x, y, z
-