Interface IProtectionHookManager
- All Known Implementing Classes:
ProtectionHookManagerSpigot
public interface IProtectionHookManager
Class that manages all objects of IProtectionCompat.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordRepresents the result of a protection hook check. -
Method Summary
Modifier and TypeMethodDescriptioncanBreakBlock(IPlayer player, ILocation loc) Check if a player can break a block at a given location.canBreakBlocksInCuboid(IPlayer player, Cuboid cuboid, IWorld world) Check if a player can break all blocks in a cuboid.booleanReturns whether all checks for block-breaking access can be skipped.
-
Method Details
-
canBreakBlock
CompletableFuture<IProtectionHookManager.HookCheckResult> canBreakBlock(IPlayer player, ILocation loc) Check if a player can break a block at a given location. -
canBreakBlocksInCuboid
CompletableFuture<IProtectionHookManager.HookCheckResult> canBreakBlocksInCuboid(IPlayer player, Cuboid cuboid, IWorld world) Check if a player can break all blocks in a cuboid. -
canSkipCheck
boolean canSkipCheck()Returns whether all checks for block-breaking access can be skipped.- Returns:
trueif all checks for block-breaking access can be skipped. This may happen when no hooks are enabled.
-