Class WorldGuardUtil

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

public abstract class WorldGuardUtil extends Object
A small utility class for helping connect with WorldGuard. This allows direct interaction with the Honeypot WorldGuard flag, and also allows developers to check if actions are allowed within a region, all without directly integrating WorldGuard in your project
  • Constructor Details

    • WorldGuardUtil

      public WorldGuardUtil()
  • Method Details

    • setupWorldGuard

      public abstract com.sk89q.worldguard.protection.flags.StateFlag setupWorldGuard()
      Sets up the hook for WorldGuard
      Returns:
      The StateFlag that was setup, if necessary.
    • getWorldGuardFlag

      public abstract com.sk89q.worldguard.protection.flags.StateFlag getWorldGuardFlag()
      Returns the WorldGuard flag
      Returns:
      StateFlag
    • isAllowed

      public abstract boolean isAllowed(org.bukkit.entity.Player player)
      Check if the allow-honeypots flag is on
      Parameters:
      player - The player initiating the action
      Returns:
      True if the action is allowed, false if the action isn't allowed OR if WorldGuard support isn't enabled.