public class RedProtectAPI extends Object
| Constructor and Description |
|---|
RedProtectAPI() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addFlag(String flag,
boolean defaultValue,
boolean isAdmin)
Add custom flags.
|
void |
addRegion(Region region,
org.bukkit.World world)
Add a region.
|
Set<Region> |
getAllRegions()
Return all regions for all loaded worlds;
|
Set<Region> |
getChunkRegions(org.bukkit.Chunk chunk)
Return all regions present on provided chunk, including low and hight priority.
|
Map<Integer,Region> |
getGroupRegions(org.bukkit.Location loc)
The group of Regions on given location x and z.
|
Map<Integer,Region> |
getGroupRegions(org.bukkit.World world,
int x,
int y,
int z)
The group of Regions on given location x and z.
|
Region |
getHighPriorityRegion(org.bukkit.World world,
int x,
int y,
int z)
In a location with more than one region, use to get the upper region with high priority.
|
Region |
getLowPriorityRegion(org.bukkit.World world,
int x,
int y,
int z)
In a location with more than one region, use to get the lower region with low priority.
|
LangManager |
getMessageApi()
Return language api to send messages using RedProtect language;
|
Set<Region> |
getPlayerRegions(org.bukkit.entity.Player player)
A set of regions created by this player.
|
Set<Region> |
getPlayerRegions(org.bukkit.entity.Player player,
int x,
int y,
int z)
A set of regions created by this player based on x and z.
|
Set<Region> |
getPlayerRegions(String uuid)
A set of regions created by this player based on uuid or player name.
|
Set<Region> |
getPlayerRegions(String uuid,
org.bukkit.World world)
A set of regions created by this player based on uuid or player name and specific world.
|
Region |
getRegion(org.bukkit.Location location)
Return the Region on location.
|
Region |
getRegion(String regionName,
org.bukkit.World world)
Give the Region based on given name and world.
|
boolean |
removeFlag(String flag,
boolean isAdmin) |
void |
removeRegion(Region region)
Remove a region.
|
void |
renameRegion(Region region,
String newName)
Rename a region;
|
public LangManager getMessageApi()
LangManager with language api.public Set<Region> getAllRegions()
Set<Region> with all regions. Empty list if no regions.public Region getRegion(String regionName, org.bukkit.World world)
regionName - Region Name.world - World where this Region is.Region matching the name or null if region not found.public Region getRegion(org.bukkit.Location location)
*Note: If theres more region in this same location this method will
return only the high priority region. To get all possible region in
one location use getGroupRegions()
location - Player location.Region of location or null if no regions on player location.public Set<Region> getPlayerRegions(String uuid)
uuid - The uuid of player in String format!
Make a way to give player name for servers using 'offline mode'.set<Region> with all regions created by given player.public Set<Region> getPlayerRegions(String uuid, org.bukkit.World world)
uuid - The uuid of player in String format!
Make a way to give player name for servers using 'offline mode'.world - to search for given region.set<Region> with all regions created by given player.public Set<Region> getPlayerRegions(org.bukkit.entity.Player player)
player - The player.set<Region> with all regions created by given player.public Set<Region> getPlayerRegions(org.bukkit.entity.Player player, int x, int y, int z)
player - Owner of regions.x - Coord x of a location.y - Coord y of a location.z - Coord z of a location.set<Region> with all regions created by given player.public Region getHighPriorityRegion(org.bukkit.World world, int x, int y, int z)
world - World to search for regions.x - Coord x of a location.y - Coord y of a location.z - Coord z of a location.Region in a group of regions.public Region getLowPriorityRegion(org.bukkit.World world, int x, int y, int z)
world - World to search for regions.x - Coord x of a location.y - Coord y of a location.z - Coord z of a location.Region in a group of regions.public Map<Integer,Region> getGroupRegions(org.bukkit.World world, int x, int y, int z)
world - World to search for regions.x - Coord x of a location.y - Coord y of a location.z - Coord z of a location.Map<Integer, Region> with Integer as priority and the corresponding Region.public Map<Integer,Region> getGroupRegions(org.bukkit.Location loc)
loc - Location to check the regionsMap<Integer, Region> with Integer as priority and the corresponding Region.public Set<Region> getChunkRegions(org.bukkit.Chunk chunk)
chunk - Chunk to get Regions.Set<Region> with all regions on provided chunk.public void addRegion(Region region, org.bukkit.World world)
region - Region to add.world - World of Region to add.public void removeRegion(Region region)
region - Region to remove.public void renameRegion(Region region, String newName)
region - Region to rename.newName - New name of region;public boolean addFlag(String flag, boolean defaultValue, boolean isAdmin)
flag - The name of flag.defaultValue - Default value if not admin flag.isAdmin - Is flag admin? If admin, will require admin permission (redprotect.admin.flag.FlagName)public boolean removeFlag(String flag, boolean isAdmin)
flag - The name of flag.isAdmin - Is Admin flag?Copyright © 2021. All rights reserved.