Interface ILockedBlock

All Known Subinterfaces:
ILockedMultiBlock

public interface ILockedBlock
Represents a locked block in the world.
Since:
3.0.0
Author:
Parker Hawke - Choco
See Also:
ILockedMultiBlock
  • Method Summary

    Modifier and Type Method Description
    org.bukkit.block.Block getBlock()
    Get the Bukkit Block represented by this locked block.
    org.bukkit.Location getLocation()
    Get the Bukkit Location at which this locked block is located.
    ZonedDateTime getLockTime()
    Get the time at which this block was locked.
    String getNickname()
    Get this block's nickname.
    ILockSecurityPlayer getOwner()
    Get the owner of this locked block.
    org.bukkit.Material getType()
    Get the Bukkit Material represented by this locked block.
    org.bukkit.World getWorld()
    Get the Bukkit World in which this locked block resides.
    int getX()
    Get the x coordinate at which this locked block resides.
    int getY()
    Get the y coordinate at which this locked block resides.
    int getZ()
    Get the z coordinate at which this locked block resides.
    boolean hasNickname()
    Check whether or not this locked block has a nickname.
    boolean isOwner​(org.bukkit.OfflinePlayer player)
    Check whether or not the specified player is the owner of this locked block.
    boolean isOwner​(ILockSecurityPlayer player)
    Check whether or not the specified player is the owner of this locked block.
    boolean isValidKey​(org.bukkit.inventory.ItemStack key)
    Check whether or not the supplied ItemStack is a valid key that will grant access to this locked block.
    void setNickname​(String nickname)
    Set this block's nickname.
    void setOwner​(ILockSecurityPlayer owner)
    Set the owner of this locked block.
  • Method Details

    • getBlock

      @NotNull org.bukkit.block.Block getBlock()
      Get the Bukkit Block represented by this locked block.
      Returns:
      the block
    • getType

      @NotNull org.bukkit.Material getType()
      Get the Bukkit Material represented by this locked block.
      Returns:
      the material
    • getLocation

      @NotNull org.bukkit.Location getLocation()
      Get the Bukkit Location at which this locked block is located.
      Returns:
      the location
    • getWorld

      @NotNull org.bukkit.World getWorld()
      Get the Bukkit World in which this locked block resides.
      Returns:
      the world
    • getX

      int getX()
      Get the x coordinate at which this locked block resides.
      Returns:
      the x coordinate
    • getY

      int getY()
      Get the y coordinate at which this locked block resides.
      Returns:
      the y coordinate
    • getZ

      int getZ()
      Get the z coordinate at which this locked block resides.
      Returns:
      the z coordinate
    • setOwner

      void setOwner​(@NotNull ILockSecurityPlayer owner)
      Set the owner of this locked block.
      Parameters:
      owner - the owner to set. Must not be null
    • getOwner

      @NotNull ILockSecurityPlayer getOwner()
      Get the owner of this locked block.
      Returns:
      the owner
    • isOwner

      boolean isOwner​(@Nullable org.bukkit.OfflinePlayer player)
      Check whether or not the specified player is the owner of this locked block.
      Parameters:
      player - the player to check
      Returns:
      true if the player owns this block, false otherwise or if null
    • isOwner

      boolean isOwner​(@Nullable ILockSecurityPlayer player)
      Check whether or not the specified player is the owner of this locked block.
      Parameters:
      player - the player to check
      Returns:
      true if the player owns this block, false otherwise or if null
    • getLockTime

      @NotNull ZonedDateTime getLockTime()
      Get the time at which this block was locked.
      Returns:
      the lock time
    • setNickname

      void setNickname​(@Nullable String nickname)
      Set this block's nickname.
      Parameters:
      nickname - the nickname to set or null if none
    • getNickname

      @Nullable String getNickname()
      Get this block's nickname.
      Returns:
      the nickname. null if none
    • hasNickname

      boolean hasNickname()
      Check whether or not this locked block has a nickname.
      Returns:
      true if this block has a nickname, false otherwise
    • isValidKey

      boolean isValidKey​(@Nullable org.bukkit.inventory.ItemStack key)
      Check whether or not the supplied ItemStack is a valid key that will grant access to this locked block.
      Parameters:
      key - the key to check
      Returns:
      true if a valid key, false otherwise or if null