Class TownyHook

java.lang.Object
valorless.rarespawns.hooks.TownyHook

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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Boolean
    canBuild(org.bukkit.entity.Player player, org.bukkit.block.Block block)
    Returns whether the player can build at the specified block location, honoring Towny permissions.
    static org.bukkit.plugin.java.JavaPlugin
    Returns the Towny plugin instance.
    static void
    Attempts to detect Towny and logs whether integration is active.
    static boolean
    Returns true when Towny is present on the server.
    static Boolean
    isInWilderness(org.bukkit.entity.Player player)
    Returns whether the player is currently located in wilderness (not in a town).
    static Boolean
    isTownResident(org.bukkit.entity.Player player)
    Returns whether the player is a resident of the town they are currently located in.

    Methods inherited from class java.lang.Object

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

    • TownyHook

      public TownyHook()
  • Method Details

    • Hook

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

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

      public static org.bukkit.plugin.java.JavaPlugin getPlugin()
      Returns the Towny plugin instance.
    • isInWilderness

      public static Boolean isInWilderness(org.bukkit.entity.Player player)
      Returns whether the player is currently located in wilderness (not in a town).
    • isTownResident

      public static Boolean isTownResident(org.bukkit.entity.Player player)
      Returns whether the player is a resident of the town they are currently located in.
    • canBuild

      public static Boolean canBuild(org.bukkit.entity.Player player, @Nullable org.bukkit.block.Block block)
      Returns whether the player can build at the specified block location, honoring Towny permissions. If block is null, checks at the player's current location.