Class Protection
java.lang.Object
com.ordwen.odailyquests.externs.hooks.Protection
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
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
Check if the player can build at the location.static boolean
Check if Towny is enabled.static boolean
Check if WorldGuard is enabled.void
load()
static void
Set Towny enabled.static void
Set WorldGuard enabled.
-
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 playerblock
- the block- Returns:
- true if the player can build, false otherwise
-
checkRegion
Check if the player is in the required region to progress the quest.- Parameters:
player
- involved playerrequiredRegions
- required regions- Returns:
- true if the player is in the required region, false otherwise
-