Interface IProtectionHookManager

All Known Implementing Classes:
ProtectionHookManagerSpigot

public interface IProtectionHookManager
Class that manages all objects of IProtectionCompat.
  • Method Details

    • canBreakBlock

      Check if a player can break a block at a given location.
      Parameters:
      player - The IPlayer.
      loc - The ILocation to check.
      Returns:
      The name of the IProtectionCompat that objects, if any, or an empty Optional if allowed by all compats.
    • canBreakBlocksInCuboid

      CompletableFuture<IProtectionHookManager.HookCheckResult> canBreakBlocksInCuboid(IPlayer player, Cuboid cuboid, IWorld world)
      Check if a player can break all blocks in a cuboid.
      Parameters:
      player - The IPlayer.
      cuboid - The Cuboid to check.
      world - The world.
      Returns:
      The name of the IProtectionCompat that objects, if any, or an empty Optional if allowed by all compats.
    • canSkipCheck

      boolean canSkipCheck()
      Returns:
      True if all checks for block-breaking access can be skipped. This may happen when no hooks are enabled.