Class Protection

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

public class Protection extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    canBuild(org.bukkit.entity.Player player, org.bukkit.block.Block block, String flag)
    Apply all checks related to world building permissions.
    static boolean
    checkRegion(org.bukkit.entity.Player player, List<String> requiredRegions)
    Check if the player is in the required region to progress the quest.
    static boolean
    checkWg(org.bukkit.entity.Player player, org.bukkit.block.Block block, String flag)
    Check if the player can build at the location.
    static boolean
    Check if Towny is enabled.
    static boolean
    Check if WorldGuard is enabled.
    void
     
    static void
    Set Towny enabled.
    static void
    Set WorldGuard enabled.

    Methods inherited from class java.lang.Object

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

      public static boolean checkWg(org.bukkit.entity.Player player, org.bukkit.block.Block block, String flag)
      Check if the player can build at the location.
      Parameters:
      player - the player
      block - the 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