Class RegionManager
java.lang.Object
br.net.fabiozumbi12.RedProtect.Bukkit.region.RegionManager
Get the region database from here. All functions for manage regions can be found in this class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclearDB()getAdminRegions(String uuid) Return a set of regions by player UUID or Name if this player is Admin or Leader;longgetCanPurgePlayer(String player, String world) getGroupRegion(String w, int x, int y, int z) Get regions in a group region.getGroupRegion(org.bukkit.Location loc) Get regions in a group region.getInnerRegions(Region region, String w) getLeaderRegions(String uuid) Return a set of regions by player UUID or Name if this player is Leader;getLowRegion(String w, int x, int y, int z) Get the low priority region in a group region.getLowRegion(org.bukkit.Location loc) Get the low priority region in a group region.getMemberRegions(String uuid) Return a set of regions by player UUID or Name if this player is Member, Admin or Leader;intgetPlayerRegions(String player, String w) getRegionById(String rid) getRegions(String player, String w) getRegions(org.bukkit.entity.Player p, int x, int y, int z) getRegionsForChunk(org.bukkit.Chunk chunk) getRegionsNear(org.bukkit.entity.Player player, int i) getTopRegion(String w, int x, int y, int z) Get the high priority region in a group region.getTopRegion(org.bukkit.Location loc) Get the high priority region in a group region.intgetTotalRegionSize(String uuid, String world) intvoidvoidloadAll()intvoidintvoidremoveLiveFlags(Region r, String flag) renameRegion(String newName, Region old) voidintsaveAll(boolean force) voidvoidvoidupdateLiveFlags(Region r, String flag, String value) voidupdateLiveRegion(Region r, String columm, Object value)
-
Constructor Details
-
RegionManager
public RegionManager()
-
-
Method Details
-
loadAll
- Throws:
Exception
-
load
- Throws:
Exception
-
unloadAll
public void unloadAll() -
unload
-
saveAll
public int saveAll(boolean force) -
getRegionById
-
getRegion
-
getTotalRegionSize
-
getLeaderRegions
Return a set of regions by player UUID or Name if this player is Leader;This will return player regions based on raw UUID or Player name, depending if server is running in Online or Offline mode;
- Parameters:
uuid- the UUID of the player.- Returns:
Set<Region>with regions
-
getAdminRegions
Return a set of regions by player UUID or Name if this player is Admin or Leader;This will return player regions based on raw UUID or Player name, depending if server is running in Online;
- Parameters:
uuid- the UUID of the player.- Returns:
Set<Region>with regions
-
getMemberRegions
Return a set of regions by player UUID or Name if this player is Member, Admin or Leader;This will return player regions based on raw UUID or Player name, depending if server is running in Online;
- Parameters:
uuid- the UUID of the player.- Returns:
Set<Region>with regions
-
getRegionsForChunk
-
getRegionsNear
-
getRegions
-
getPlayerRegions
-
add
-
getCanPurgePlayer
-
save
-
remove
-
getRegions
-
getInnerRegions
-
removeAll
-
regenAll
-
getTopRegion
Get the high priority region in a group region. If no other regions, return the unique region on location.- Parameters:
loc- Location- Returns:
Region- Or null if no regions on this location.
-
getTopRegion
Get the high priority region in a group region. If no other regions, return the unique region on location.- Parameters:
w- Worldx- Location xy- Location yz- Location z- Returns:
Region- Or null if no regions on this location.
-
getLowRegion
Get the low priority region in a group region. If no other regions, return the unique region on location.- Parameters:
w- Worldx- Location xy- Location yz- Location z- Returns:
Region- Or null if no regions on this location.
-
getLowRegion
Get the low priority region in a group region. If no other regions, return the unique region on location.- Parameters:
loc- location to get region.- Returns:
Region- Or null if no regions on this location.
-
getGroupRegion
Get regions in a group region. If no other regions, return the unique region on location.- Parameters:
w- Worldx- Location xy- Location yz- Location z- Returns:
Map<Integer,Region>- Indexed by priority
-
getGroupRegion
Get regions in a group region. If no other regions, return the unique region on location.- Returns:
Map<Integer,Region>- Indexed by priority
-
getAllRegions
-
getRegionsByWorld
-
clearDB
public void clearDB() -
updateLiveRegion
-
updateLiveFlags
-
removeLiveFlags
-
getTotalRegionsNum
public int getTotalRegionsNum() -
renameRegion
-