Class WorldGuardUtil
java.lang.Object
org.reprogle.honeypot.common.utils.integrations.WorldGuardUtil
A small utility class for helping connect with WorldGuard
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.sk89q.worldguard.protection.flags.StateFlagReturns the WorldGuard flagbooleanisAllowed(org.bukkit.entity.Player player, org.bukkit.Location location) Check if the allow-honeypots flag is oncom.sk89q.worldguard.protection.flags.StateFlagSets up the hook for WorldGuard
-
Constructor Details
-
WorldGuardUtil
public WorldGuardUtil()
-
-
Method Details
-
setupWorldGuard
public com.sk89q.worldguard.protection.flags.StateFlag setupWorldGuard()Sets up the hook for WorldGuard -
getWorldGuardFlag
public com.sk89q.worldguard.protection.flags.StateFlag getWorldGuardFlag()Returns the WorldGuard flag- Returns:
StateFlag
-
isAllowed
public boolean isAllowed(org.bukkit.entity.Player player, org.bukkit.Location location) Check if the allow-honeypots flag is on- Parameters:
player- The player initiating the actionlocation- The location of the block being placed (It may be different from the player location)- Returns:
- True if the action is allowed, false if the action isn't allowed OR if WorldGuard support isn't enabled.
-