Class CoreRegion
java.lang.Object
br.net.fabiozumbi12.RedProtect.Core.region.CoreRegion
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Set<PlayerRegion>protected final booleanprotected booleanprotected Stringprotected Set<PlayerRegion>protected intprotected intprotected intprotected Set<PlayerRegion>protected intprotected intprotected intprotected final Stringprotected intstatic final longprotected int[]protected float[]protected doubleprotected Stringprotected String -
Constructor Summary
ConstructorsConstructorDescriptionCoreRegion(String name, int[] min, int[] max, String world, String defLeader, Map<String, Object> defFlags) Represents the region created by player.CoreRegion(String name, Set<PlayerRegion> admins, Set<PlayerRegion> members, Set<PlayerRegion> leaders, int[] x, int[] z, int miny, int maxy, int prior, String worldName, String date, Map<String, Object> flags, String welcome, double value, int[] tppoint, float[] tppointYaw, boolean candel, boolean canPurge) Represents the region created by player.CoreRegion(String name, Set<PlayerRegion> admins, Set<PlayerRegion> members, Set<PlayerRegion> leaders, int[] minLoc, int[] maxLoc, Map<String, Object> flags, String wMessage, int prior, String worldName, String date, double value, int[] tppoint, float[] tppointYaw, boolean candel, boolean canPurge) Represents the region created by player.CoreRegion(String name, Set<PlayerRegion> admins, Set<PlayerRegion> members, Set<PlayerRegion> leaders, int maxMbrX, int minMbrX, int maxMbrZ, int minMbrZ, int minY, int maxY, Map<String, Object> flags, String wMessage, int prior, String worldName, String date, double value, int[] tppoint, float[] tppointYaw, boolean candel, boolean canPurge) Represents the region created by player. -
Method Summary
Modifier and TypeMethodDescriptionintbooleanbooleancanPurge()booleanflagExists(String key) Use this method to get raw admins.intgetArea()intintintgetDate()getFlags()getID()Get unique ID of region based on name of "region + @ + world".Use this method to get raw leaders.intintintgetMaxY()Use this method to get raw members.intintintgetMinY()getName()intgetPrior()doublegetValue()getWorld()booleanbooleanisAdminByName(String player) booleanisAdminByUUID(String player) booleanbooleanisLeaderByName(String player) booleanisLeaderByUUID(String player) booleanbooleanisMemberByName(String player) booleanisMemberByUUID(String player) intbooleanprotected StringserializeMembers(Set<PlayerRegion> pairs) voidvoidsetToSave(boolean save) booleantoSave()toString()Get unique ID of region based on name of "region + @ + world".
-
Field Details
-
serialVersionUID
public static final long serialVersionUID- See Also:
-
minMbrX
protected int minMbrX -
maxMbrX
protected int maxMbrX -
minMbrZ
protected int minMbrZ -
maxMbrZ
protected int maxMbrZ -
minY
protected int minY -
maxY
protected int maxY -
prior
protected int prior -
name
-
leaders
-
admins
-
members
-
wMessage
-
world
-
date
-
flags
-
value
protected double value -
tppoint
protected int[] tppoint -
tppointYaw
protected float[] tppointYaw -
canDelete
protected final boolean canDelete -
canPurge
protected boolean canPurge
-
-
Constructor Details
-
CoreRegion
public CoreRegion(String name, Set<PlayerRegion> admins, Set<PlayerRegion> members, Set<PlayerRegion> leaders, int[] minLoc, int[] maxLoc, Map<String, Object> flags, String wMessage, int prior, String worldName, String date, double value, int[] tppoint, float[] tppointYaw, boolean candel, boolean canPurge) Represents the region created by player.- Parameters:
name- Name of region.admins- List of admins.members- List of members.leaders- List of leaders.minLoc- Min coord.maxLoc- Max coord.flags- Flag names and values.wMessage- Welcome message.prior- Priority of region.worldName- Name of world for this region.date- Date of latest visit of an admin or leader.value- Last value of this region.tppoint- Teleport PointtppointYaw- Teleport Pitch and Yam
-
CoreRegion
public CoreRegion(String name, Set<PlayerRegion> admins, Set<PlayerRegion> members, Set<PlayerRegion> leaders, int maxMbrX, int minMbrX, int maxMbrZ, int minMbrZ, int minY, int maxY, Map<String, Object> flags, String wMessage, int prior, String worldName, String date, double value, int[] tppoint, float[] tppointYaw, boolean candel, boolean canPurge) Represents the region created by player.- Parameters:
name- Name of region.admins- List of admins.members- List of members.leaders- List of leaders.maxMbrX- Max coord XminMbrX- Min coord XmaxMbrZ- Max coord ZminMbrZ- Min coord Zflags- Flag names and values.wMessage- Welcome message.prior- Priority of region.worldName- Name of world for this region.date- Date of latest visit of an admin or leader.value- Last value of this region.tppoint- Teleport PointtppointYaw- Teleport Pitch and Yam
-
CoreRegion
public CoreRegion(String name, Set<PlayerRegion> admins, Set<PlayerRegion> members, Set<PlayerRegion> leaders, int[] x, int[] z, int miny, int maxy, int prior, String worldName, String date, Map<String, Object> flags, String welcome, double value, int[] tppoint, float[] tppointYaw, boolean candel, boolean canPurge) Represents the region created by player.- Parameters:
name- Region name.admins- Admins names/uuids.members- Members names/uuids.leaders- Leaders name/uuid.x- Locations of x coords.z- Locations of z coords.miny- Min coord y of this region.maxy- Max coord y of this region.prior- Location of x coords.worldName- Name of world region.date- Date of latest visit of an admins or leader.welcome- Set a welcome message.value- A value in server economy.tppoint- Teleport PointtppointYaw- Teleport Pitch and Yam
-
CoreRegion
public CoreRegion(String name, int[] min, int[] max, String world, String defLeader, Map<String, Object> defFlags) Represents the region created by player.- Parameters:
name- Region name.min- Min Location.max- Max Location.world- World name.
-
-
Method Details
-
getFlags
-
setFlags
-
canPurge
public boolean canPurge() -
canDelete
public boolean canDelete() -
toString
Get unique ID of region based on name of "region + @ + world". -
getID
Get unique ID of region based on name of "region + @ + world".- Returns:
id string
-
toSave
public boolean toSave() -
setToSave
public void setToSave(boolean save) -
getFlagStrings
-
getTPPointString
-
getDate
-
getMaxY
public int getMaxY() -
getMinY
public int getMinY() -
getWorld
-
getPrior
public int getPrior() -
getWelcome
-
getName
-
getAdmins
Use this method to get raw admins. This will return UUID if server running in Online mode. Will return player name in lowercase if Offline mode.To check if a player can build on this region use
canBuild(p)instead this method.- Returns:
Set<PlayerRegion<String, String>>
-
getMembers
Use this method to get raw members. This will return UUID if server running in Online mode. Will return player name in lowercase if Offline mode.To check if a player can build on this region use
canBuild(Player p)instead this method.- Returns:
Set<PlayerRegion<String, String>>
-
getLeaders
Use this method to get raw leaders. This will return UUID if server running in Online mode. Will return player name in lowercase if Offline mode.To check if a player can build on this region use
canBuild(Player p)instead this method.- Returns:
Set<PlayerRegion<String, String>>
-
getCenterX
public int getCenterX() -
getCenterZ
public int getCenterZ() -
getCenterY
public int getCenterY() -
getMaxMbrX
public int getMaxMbrX() -
getMinMbrX
public int getMinMbrX() -
getMaxMbrZ
public int getMaxMbrZ() -
getMinMbrZ
public int getMinMbrZ() -
getArea
public int getArea() -
isLeaderByUUID
-
isAdminByUUID
-
isMemberByUUID
-
isLeaderByName
-
isAdminByName
-
isMemberByName
-
isLeader
-
isAdmin
-
isMember
-
adminSize
public int adminSize() -
leaderSize
public int leaderSize() -
flagExists
-
getValue
public double getValue() -
serializeMembers
-
sameLeaders
-
getLeadersString
-
getAdminString
-
getMembersString
-