Class GriefPreventionHook

java.lang.Object
valorless.rarespawns.hooks.GriefPreventionHook

public class GriefPreventionHook extends Object
Integration helper for GriefPrevention. Provides detection, logging, and access to the plugin instance.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static me.ryanhamshire.GriefPrevention.Claim
    GetClaim(org.bukkit.entity.Player player)
    Gets the claim at the player's current location.
    static org.bukkit.plugin.java.JavaPlugin
    Returns the GriefPrevention plugin instance.
    static boolean
    HasTrust(org.bukkit.entity.Player player, String permission)
    Checks if the player has the specified trust level in the claim at their location.
    static void
    Attempts to detect GriefPrevention and logs whether integration is active.
    static me.ryanhamshire.GriefPrevention.Claim
    InClaim(org.bukkit.entity.Player player)
    Returns the claim at the player's current location, or null if none.
    static boolean
    Returns true when GriefPrevention is present on the server.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GriefPreventionHook

      public GriefPreventionHook()
  • Method Details

    • Hook

      public static void Hook()
      Attempts to detect GriefPrevention and logs whether integration is active.
    • isHooked

      public static boolean isHooked()
      Returns true when GriefPrevention is present on the server.
    • getPlugin

      public static org.bukkit.plugin.java.JavaPlugin getPlugin()
      Returns the GriefPrevention plugin instance.
    • InClaim

      public static me.ryanhamshire.GriefPrevention.Claim InClaim(org.bukkit.entity.Player player)
      Returns the claim at the player's current location, or null if none.
    • HasTrust

      public static boolean HasTrust(org.bukkit.entity.Player player, String permission)
      Checks if the player has the specified trust level in the claim at their location.
      Parameters:
      player - the player to test
      permission - the ClaimPermission enum name (e.g., BUILD, CONTAINER, ACCESS, MANAGE)
      Returns:
      true if trusted; false otherwise
    • GetClaim

      public static me.ryanhamshire.GriefPrevention.Claim GetClaim(org.bukkit.entity.Player player)
      Gets the claim at the player's current location.