Interface ChestProtection

All Known Implementing Classes:
SignChestProtection

public interface ChestProtection
Interface for chest protection.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isAdjacentChestProtected(com.sk89q.worldedit.util.Location searchBlock, LocalPlayer player)
    Returns whether an adjacent chest is protected.
    default boolean
    isChest(com.sk89q.worldedit.world.block.BlockType blockType)
    Returns whether a blockType is a chest.
    boolean
    isProtected(com.sk89q.worldedit.util.Location block, LocalPlayer player)
    Returns whether a block is protected.
    boolean
    isProtectedPlacement(com.sk89q.worldedit.util.Location block, LocalPlayer player)
    Returns whether a location where a chest block is trying to be created is protected.
  • Method Details

    • isProtected

      boolean isProtected(com.sk89q.worldedit.util.Location block, LocalPlayer player)
      Returns whether a block is protected.
      Parameters:
      block - The block to check
      player - The player to check
      Returns:
      Whether the block is protected for player
    • isProtectedPlacement

      boolean isProtectedPlacement(com.sk89q.worldedit.util.Location block, LocalPlayer player)
      Returns whether a location where a chest block is trying to be created is protected.
      Parameters:
      block - The block to check
      player - The player to check
      Returns:
      Whether player can place a block at the specified block
    • isAdjacentChestProtected

      boolean isAdjacentChestProtected(com.sk89q.worldedit.util.Location searchBlock, LocalPlayer player)
      Returns whether an adjacent chest is protected.
      Parameters:
      searchBlock - The block to check
      player - The player to check
      Returns:
      Whether searchBlock is protected from access by player
    • isChest

      default boolean isChest(com.sk89q.worldedit.world.block.BlockType blockType)
      Returns whether a blockType is a chest.
      Parameters:
      blockType - The blockType to check
      Returns:
      Whether a type is a 'chest' (protectable block)