Class ClaimApi
java.lang.Object
net.joseplay.allianceutils.api.claims.ClaimApi
API that provides information about land protection.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanallowFlagRegion(org.bukkit.Location location, com.sk89q.worldguard.protection.flags.StateFlag flags) Checks if aStateFlagis allowed in the region where the location is situated.static booleanallowPvPRegion(org.bukkit.Location location) Check if PvP is allowed in the region where the location is situated.booleanisClaimRegion(org.bukkit.Location location) Check if the location is included in a claim (GriefPrevention or HuskClaims).booleanisPlayerClaimOwner(org.bukkit.entity.Player player, org.bukkit.Location location) Checks if the player owns a piece of land.static booleanisRegion(org.bukkit.Location location) Check if the location is in a region protected by WorldGuard.booleanplayerCanClaimBuild(org.bukkit.entity.Player player, org.bukkit.Location location) Checks if the player has permission to build on the land.
-
Constructor Details
-
ClaimApi
public ClaimApi()
-
-
Method Details
-
isRegion
public static boolean isRegion(org.bukkit.Location location) Check if the location is in a region protected by WorldGuard.- Parameters:
location- The location to be verified.- Returns:
- True if in a protected region, false otherwise.
-
allowPvPRegion
public static boolean allowPvPRegion(org.bukkit.Location location) Check if PvP is allowed in the region where the location is situated.- Parameters:
location- The location to be verified.- Returns:
- True if PvP is allowed, false otherwise.
-
allowFlagRegion
public static boolean allowFlagRegion(org.bukkit.Location location, com.sk89q.worldguard.protection.flags.StateFlag flags) Checks if aStateFlagis allowed in the region where the location is situated.- Parameters:
location- The location to be verified.flags- The flag that will be tested- Returns:
- True if the flag is allowed or is not a region, false otherwise.
-
isClaimRegion
public boolean isClaimRegion(org.bukkit.Location location) Check if the location is included in a claim (GriefPrevention or HuskClaims).- Parameters:
location- The location to be verified.- Returns:
- True if it's in a claim, false otherwise.
-
isPlayerClaimOwner
public boolean isPlayerClaimOwner(org.bukkit.entity.Player player, org.bukkit.Location location) Checks if the player owns a piece of land.- Parameters:
player- The player to be verified.location- The location of the land.- Returns:
- True if you are the owner, false otherwise.
-
playerCanClaimBuild
public boolean playerCanClaimBuild(org.bukkit.entity.Player player, org.bukkit.Location location) Checks if the player has permission to build on the land.- Parameters:
player- The player to be verified.location- The location of the land.- Returns:
- True if permitted, false otherwise.
-