Package xyz.tehbrian.restrictionhelper
Class Restriction
- java.lang.Object
-
- xyz.tehbrian.restrictionhelper.Restriction
-
- Direct Known Subclasses:
PlotSquaredRestriction,WorldGuardRestriction
public abstract class Restriction extends java.lang.ObjectThe abstract class which all restrictions must extend.
-
-
Field Summary
Fields Modifier and Type Field Description protected DebugLoggerdebugLoggerThe DebugLogger which will be used to log whether a check fails or passes, and why.
-
Constructor Summary
Constructors Constructor Description Restriction(DebugLogger debugLogger)
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract booleancheck(org.bukkit.entity.Player player, org.bukkit.Location loc, ActionType actionType)Checks whetherplayerhas sufficient permission to performactionatloc.
-
-
-
Field Detail
-
debugLogger
protected final DebugLogger debugLogger
The DebugLogger which will be used to log whether a check fails or passes, and why.
-
-
Constructor Detail
-
Restriction
public Restriction(DebugLogger debugLogger)
- Parameters:
debugLogger- the debug logger to be used
-
-
Method Detail
-
check
public abstract boolean check(org.bukkit.entity.Player player, org.bukkit.Location loc, ActionType actionType)Checks whetherplayerhas sufficient permission to performactionatloc.- Parameters:
player- the playerloc- the location to checkactionType- the type of action- Returns:
- true if the player has permission, false if not
-
-