Class Protection

java.lang.Object
com.ordwen.odailyquests.externs.hooks.Protection

public class Protection extends Object
  • Constructor Details

    • Protection

      public Protection()
  • Method Details

    • load

      public void load()
    • isTownyEnabled

      public static boolean isTownyEnabled()
      Check if Towny is enabled.
      Returns:
      true if Towny is enabled, false otherwise
    • setTownyEnabled

      public static void setTownyEnabled()
      Set Towny enabled.
    • isWorldGuardEnabled

      public static boolean isWorldGuardEnabled()
      Check if WorldGuard is enabled.
      Returns:
      true if WorldGuard is enabled, false otherwise
    • setWorldGuardEnabled

      public static void setWorldGuardEnabled()
      Set WorldGuard enabled.
    • isPlotSquaredEnabled

      public static boolean isPlotSquaredEnabled()
      Check if PlotSquared is enabled.
      Returns:
      true if PlotSquared is enabled, false otherwise
    • setPlotSquaredEnabled

      public static void setPlotSquaredEnabled()
      Set PlotSquared enabled.
    • canBuild

      public static boolean canBuild(org.bukkit.entity.Player player, org.bukkit.block.Block block, String flag)
      Apply all checks related to world building permissions. Currently supporting Towny.
      Parameters:
      player - involved player.
      block - involved block.
      Returns:
      true if the player can build, false otherwise.
    • checkRegion

      public static boolean checkRegion(org.bukkit.entity.Player player, List<String> requiredRegions)
      Check if the player is in the required region to progress the quest.
      Parameters:
      player - involved player
      requiredRegions - required regions
      Returns:
      true if the player is in the required region, false otherwise