Class ClaimApi

java.lang.Object
net.joseplay.allianceutils.api.claims.ClaimApi

public class ClaimApi extends Object
API that provides information about land protection.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    allowFlagRegion(org.bukkit.Location location, com.sk89q.worldguard.protection.flags.StateFlag flags)
    Checks if a StateFlag is allowed in the region where the location is situated.
    static boolean
    allowPvPRegion(org.bukkit.Location location)
    Check if PvP is allowed in the region where the location is situated.
    boolean
    isClaimRegion(org.bukkit.Location location)
    Check if the location is included in a claim (GriefPrevention or HuskClaims).
    boolean
    isPlayerClaimOwner(org.bukkit.entity.Player player, org.bukkit.Location location)
    Checks if the player owns a piece of land.
    static boolean
    isRegion(org.bukkit.Location location)
    Check if the location is in a region protected by WorldGuard.
    boolean
    playerCanClaimBuild(org.bukkit.entity.Player player, org.bukkit.Location location)
    Checks if the player has permission to build on the land.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 a StateFlag is 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.