Interface AngelChest


public interface AngelChest
Represents an instance of an AngelChest
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull ItemStack[]
    Gets the items the player had equipped in the armor slots
    @NotNull Block
    Gets the block where the chest was spawned
    long
    Gets the java.lang.System.currentTimeMillis() when this chest has been created
    int
    Gets the amount of experience stored in the chest
    @Nullable ItemStack
    Gets the offhand item
    Gets a list of all players who have opened this chest
    @NotNull OfflinePlayer
    Gets the player who owns the chest
    int
    Gets the amount of seconds that are left until the chest expires
    @NotNull ItemStack[]
    Gets the items the player had stored in his regular inventory
    int
    Gets the amount of seconds left until the chest will automatically unlock
    @NotNull World
    Gets the world where the chest was spawned
    boolean
    Checks whether this chest is completely empty
    boolean
    Checks whether this chest will expire sometime
    boolean
    Checks whether the chest is protected from other players
    void
    setArmorInv​(@NotNull ItemStack[] armorInv)
    Sets the items the player had equipped in the armor slots
    void
    setExperience​(int experience)
    Sets the amount of experience stored in the chest
    void
    setInfinite​(boolean isInfinite)
    Set whether this chest will expire sometime
    void
    setOffhandItem​(@Nullable ItemStack offhandItem)
    Sets the offhand item
    void
    setProtected​(boolean isProtected)
    Sets whether the chest is protected from other players
    void
    setSecondsLeft​(int secondsLeft)
    Sets the amount of seconds left until the chest expires
    void
    setStorageInv​(@NotNull ItemStack[] storageInv)
    Sets the items the player had stored in his regular inventory
    void
    setUnlockIn​(int unlockIn)
    Sets the amount of seconds left until the chest will automatically unlock
  • Method Details

    • getArmorInv

      @NotNull @NotNull ItemStack[] getArmorInv()
      Gets the items the player had equipped in the armor slots
      Returns:
      Stored armor items
    • setArmorInv

      void setArmorInv(@NotNull @NotNull ItemStack[] armorInv)
      Sets the items the player had equipped in the armor slots
      Parameters:
      armorInv - New armor items. Must be an array of 4 ItemStacks
    • getStorageInv

      @NotNull @NotNull ItemStack[] getStorageInv()
      Gets the items the player had stored in his regular inventory
      Returns:
      Stored items
    • setStorageInv

      void setStorageInv(@NotNull @NotNull ItemStack[] storageInv)
      Sets the items the player had stored in his regular inventory
      Parameters:
      storageInv - New items. Must be an array of 36 ItemStacks
    • getOffhandItem

      @Nullable @Nullable ItemStack getOffhandItem()
      Gets the offhand item
      Returns:
      Offhand item
    • setOffhandItem

      void setOffhandItem(@Nullable @Nullable ItemStack offhandItem)
      Sets the offhand item
      Parameters:
      offhandItem -
    • isProtected

      boolean isProtected()
      Checks whether the chest is protected from other players
      Returns:
      true when protected, otherwise false
    • setProtected

      void setProtected(boolean isProtected)
      Sets whether the chest is protected from other players
      Parameters:
      isProtected -
    • getSecondsLeft

      int getSecondsLeft()
      Gets the amount of seconds that are left until the chest expires
      Returns:
      Seconds left
    • setSecondsLeft

      void setSecondsLeft(int secondsLeft)
      Sets the amount of seconds left until the chest expires
      Parameters:
      secondsLeft -
    • getUnlockIn

      int getUnlockIn()
      Gets the amount of seconds left until the chest will automatically unlock
      Returns:
      Amount of seconds left, or -1 if the chest will not automatically unlock
    • setUnlockIn

      void setUnlockIn(int unlockIn)
      Sets the amount of seconds left until the chest will automatically unlock
      Parameters:
      unlockIn - Amount of seconds left, or -1 if the chest shall not automatically unlock
    • getExperience

      int getExperience()
      Gets the amount of experience stored in the chest
      Returns:
      Amount of experience
    • setExperience

      void setExperience(int experience)
      Sets the amount of experience stored in the chest
      Parameters:
      experience -
    • getPlayer

      @NotNull @NotNull OfflinePlayer getPlayer()
      Gets the player who owns the chest
      Returns:
    • getBlock

      @NotNull @NotNull Block getBlock()
      Gets the block where the chest was spawned
      Returns:
    • getWorld

      @NotNull @NotNull World getWorld()
      Gets the world where the chest was spawned
      Returns:
    • isEmpty

      boolean isEmpty()
      Checks whether this chest is completely empty
      Returns:
      true if the chest contains neither experience nor any items, otherwise false
    • isInfinite

      boolean isInfinite()
      Checks whether this chest will expire sometime
      Returns:
      true if the chest is infinite, otherwise false
    • setInfinite

      void setInfinite(boolean isInfinite)
      Set whether this chest will expire sometime
      Parameters:
      isInfinite - true if the chest shall never expire, otherwise false
    • getOpenedBy

      @NotNull @NotNull List<OfflinePlayer> getOpenedBy()
      Gets a list of all players who have opened this chest
      Returns:
    • getCreated

      long getCreated()
      Gets the java.lang.System.currentTimeMillis() when this chest has been created
      Returns: