Class WbsRegionHook
java.lang.Object
wbs.utils.util.pluginhooks.region.WbsRegionHook
- Direct Known Subclasses:
GriefPreventionRegionHook,PlotSquaredRegionHook,TownyRegionHook,WorldGuardRegionHook
Represents a set of commonly used checks for other plugins.
Implementing classes represent a single plugin, and implement methods for
performing these standard checks on that plugin.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleancanDealDamage(org.bukkit.entity.Entity attacker, org.bukkit.entity.Entity victim) Can the attacker damage the victim according to the associated plugin?abstract booleancanPlayerBuild(org.bukkit.Location loc, org.bukkit.entity.Player player) Check if the given player can build at the given location.booleanenabled()abstract String
-
Constructor Details
-
WbsRegionHook
public WbsRegionHook()
-
-
Method Details
-
canPlayerBuild
public abstract boolean canPlayerBuild(org.bukkit.Location loc, org.bukkit.entity.Player player) Check if the given player can build at the given location.- Parameters:
loc- The location to checkplayer- The player to verify against- Returns:
- True if the player may build there, false otherwise
-
canDealDamage
public abstract boolean canDealDamage(org.bukkit.entity.Entity attacker, org.bukkit.entity.Entity victim) Can the attacker damage the victim according to the associated plugin?- Parameters:
attacker- The attacking entityvictim- The entity being attacked- Returns:
- True if the attacker can damage the victim.
-
getRequiredPlugin
- Returns:
- The name of the plugin to interact with
-
enabled
public boolean enabled()- Returns:
- True if the correct plugin is enabled
-