Package valorless.rarespawns.hooks
Class TownyHook
java.lang.Object
valorless.rarespawns.hooks.TownyHook
Integration helper for Towny.
Provides detection, logging, and access to the plugin instance.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BooleancanBuild(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.JavaPluginReturns the Towny plugin instance.static voidHook()Attempts to detect Towny and logs whether integration is active.static booleanisHooked()Returns true when Towny is present on the server.static BooleanisInWilderness(org.bukkit.entity.Player player) Returns whether the player is currently located in wilderness (not in a town).static BooleanisTownResident(org.bukkit.entity.Player player) Returns whether the player is a resident of the town they are currently located in.
-
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
Returns whether the player is currently located in wilderness (not in a town). -
isTownResident
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.
-