Class WorldGuardUtil

java.lang.Object
org.reprogle.honeypot.utils.WorldGuardUtil

public class WorldGuardUtil extends Object
A small utility class for helping connect with 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 action
      location - 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.