Package com.sk89q.worldguard.chest
Interface ChestProtection
- All Known Implementing Classes:
SignChestProtection
public interface ChestProtection
Interface for chest protection.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisAdjacentChestProtected(com.sk89q.worldedit.util.Location searchBlock, LocalPlayer player)Returns whether an adjacent chest is protected.default booleanisChest(com.sk89q.worldedit.world.block.BlockType blockType)Returns whether a blockType is a chest.booleanisProtected(com.sk89q.worldedit.util.Location block, LocalPlayer player)Returns whether a block is protected.booleanisProtectedPlacement(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
Returns whether a block is protected.- Parameters:
block- The block to checkplayer- The player to check- Returns:
- Whether the block is protected for player
-
isProtectedPlacement
Returns whether a location where a chest block is trying to be created is protected.- Parameters:
block- The block to checkplayer- The player to check- Returns:
- Whether
playercan 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 checkplayer- The player to check- Returns:
- Whether
searchBlockis protected from access byplayer
-
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)
-