Interface AuctionItem


public interface AuctionItem
  • Method Summary

    Modifier and Type
    Method
    Description
    buildTransaction(long price)
    Builds a transaction for the auction item at the specified price.
    boolean
    Checks if the item can be bought.
    org.bukkit.inventory.ItemStack
    createItem(org.bukkit.entity.Player player, Message message)
    Creates an item stack with specific player and message attributes.
    int
    Gets the amount of items in the item stack.
    org.bukkit.OfflinePlayer
    Gets the buyer of the auction item as an OfflinePlayer.
    Gets the UUID of the buyer.
    Gets the UUID of the buyer.
    Gets the economy type used in the auction.
    Gets the name of the economy type used.
    long
    Gets the expiration time of the auction item.
    org.bukkit.inventory.ItemStack
    Gets the item stack representing the auction item.
    List<org.bukkit.inventory.ItemStack>
    Gets the list of item stacks associated with the auction item.
    long
    Gets the price of the auction item.
    int
    Gets the priority of the auction item.
    org.bukkit.OfflinePlayer
    Gets the seller of the auction item as an OfflinePlayer.
    Gets the name of the seller.
    Gets the UUID of the seller.
    Gets the server name associated with the auction item.
    Gets the storage type of the auction item.
    Gets the type of the auction.
    Gets the unique identifier for the item.
    void
    giveIf(org.bukkit.entity.Player player, Predicate<AuctionItem> predicate)
    Gives the auction item to a player if the specified predicate is satisfied.
    boolean
    hasFreeSpace(org.bukkit.entity.Player player)
    Checks if the player has free space for the item.
    boolean
    Checks if the item is already being bought.
    boolean
    Checks if the auction item has expired.
    boolean
    match(Optional<Filter> optional, String string)
    Matches the auction item with a specified filter and string.
    Formats the price of the auction item as a string.
    Serializes the item stack to a string.
    Serializes the list of item stacks to a list of strings.
    void
    setAlreadyBuying(boolean b)
    Sets whether the item is already being bought.
    void
    setBuyer(UUID uuid)
    Sets the buyer of the auction item using their UUID.
    void
    setCanBuy(boolean b)
    Sets whether the item can be bought.
    void
    setExpireAt(long expireAt)
    Sets the expiration time of the auction item.
    void
    setPrice(long price)
    Sets the price of the auction item.
    void
    Sets the storage type of the auction item.
    statusFormat(UUID uniqueId)
    Formats the status of the auction item based on the specified unique ID.
    Formats the remaining time of the auction item as a string.
  • Method Details

    • getUniqueId

      UUID getUniqueId()
      Gets the unique identifier for the item.
      Returns:
      the UUID of the item.
    • getItemStack

      org.bukkit.inventory.ItemStack getItemStack()
      Gets the item stack representing the auction item.
      Returns:
      the ItemStack.
    • getType

      AuctionType getType()
      Gets the type of the auction.
      Returns:
      the AuctionType.
    • getPrice

      long getPrice()
      Gets the price of the auction item.
      Returns:
      the price.
    • setPrice

      void setPrice(long price)
      Sets the price of the auction item.
      Parameters:
      price - the price to set.
    • getEconomy

      AuctionEconomy getEconomy()
      Gets the economy type used in the auction.
      Returns:
      the AuctionEconomy.
    • getEconomyName

      String getEconomyName()
      Gets the name of the economy type used.
      Returns:
      the economy name.
    • getSeller

      org.bukkit.OfflinePlayer getSeller()
      Gets the seller of the auction item as an OfflinePlayer.
      Returns:
      the seller.
    • getBuyer

      org.bukkit.OfflinePlayer getBuyer()
      Gets the buyer of the auction item as an OfflinePlayer.
      Returns:
      the buyer.
    • setBuyer

      void setBuyer(UUID uuid)
      Sets the buyer of the auction item using their UUID.
      Parameters:
      uuid - the UUID of the buyer.
    • getSellerUniqueId

      UUID getSellerUniqueId()
      Gets the UUID of the seller.
      Returns:
      the UUID of the seller.
    • getBuyerUniqueId

      UUID getBuyerUniqueId()
      Gets the UUID of the buyer.
      Returns:
      the UUID of the buyer.
    • getExpireAt

      long getExpireAt()
      Gets the expiration time of the auction item.
      Returns:
      the expiration time in milliseconds.
    • setExpireAt

      void setExpireAt(long expireAt)
      Sets the expiration time of the auction item.
      Parameters:
      expireAt - the expiration time in milliseconds.
    • serializedItem

      String serializedItem()
      Serializes the item stack to a string.
      Returns:
      the serialized item stack.
    • createItem

      org.bukkit.inventory.ItemStack createItem(org.bukkit.entity.Player player, Message message)
      Creates an item stack with specific player and message attributes.
      Parameters:
      player - the player for whom the item is created.
      message - the message associated with the item.
      Returns:
      the created ItemStack.
    • canBuy

      boolean canBuy()
      Checks if the item can be bought.
      Returns:
      true if the item can be bought, false otherwise.
    • setCanBuy

      void setCanBuy(boolean b)
      Sets whether the item can be bought.
      Parameters:
      b - true if the item can be bought, false otherwise.
    • isAlreadyBuying

      boolean isAlreadyBuying()
      Checks if the item is already being bought.
      Returns:
      true if the item is already being bought, false otherwise.
    • setAlreadyBuying

      void setAlreadyBuying(boolean b)
      Sets whether the item is already being bought.
      Parameters:
      b - true if the item is already being bought, false otherwise.
    • getAmount

      int getAmount()
      Gets the amount of items in the item stack.
      Returns:
      the amount of items.
    • buildTransaction

      Transaction buildTransaction(long price)
      Builds a transaction for the auction item at the specified price.
      Parameters:
      price - the price for the transaction.
      Returns:
      the Transaction.
    • getItemStacks

      List<org.bukkit.inventory.ItemStack> getItemStacks()
      Gets the list of item stacks associated with the auction item.
      Returns:
      a list of ItemStacks.
    • serializedItems

      List<String> serializedItems()
      Serializes the list of item stacks to a list of strings.
      Returns:
      a list of serialized item stacks.
    • hasFreeSpace

      boolean hasFreeSpace(org.bukkit.entity.Player player)
      Checks if the player has free space for the item.
      Parameters:
      player - the player to check.
      Returns:
      true if the player has free space, false otherwise.
    • match

      boolean match(Optional<Filter> optional, String string)
      Matches the auction item with a specified filter and string.
      Parameters:
      optional - the optional filter to match.
      string - the string to match.
      Returns:
      true if the item matches the filter and string, false otherwise.
    • isExpired

      boolean isExpired()
      Checks if the auction item has expired.
      Returns:
      true if the item has expired, false otherwise.
    • getStorageType

      StorageType getStorageType()
      Gets the storage type of the auction item.
      Returns:
      the StorageType.
    • setStorageType

      void setStorageType(StorageType storageType)
      Sets the storage type of the auction item.
      Parameters:
      storageType - the storage type to set.
    • getSellerName

      String getSellerName()
      Gets the name of the seller.
      Returns:
      the seller's name.
    • giveIf

      void giveIf(org.bukkit.entity.Player player, Predicate<AuctionItem> predicate)
      Gives the auction item to a player if the specified predicate is satisfied.
      Parameters:
      player - the player to give the item to.
      predicate - the predicate to check.
    • getPriority

      int getPriority()
      Gets the priority of the auction item.
      Returns:
      the priority.
    • priceFormat

      String priceFormat()
      Formats the price of the auction item as a string.
      Returns:
      the formatted price.
    • timeFormat

      String timeFormat()
      Formats the remaining time of the auction item as a string.
      Returns:
      the formatted time.
    • statusFormat

      String statusFormat(UUID uniqueId)
      Formats the status of the auction item based on the specified unique ID.
      Parameters:
      uniqueId - the unique ID to check the status against.
      Returns:
      the formatted status.
    • getBuyerUUID

      UUID getBuyerUUID()
      Gets the UUID of the buyer.
      Returns:
      the UUID of the buyer.
    • getServer

      String getServer()
      Gets the server name associated with the auction item.
      Returns:
      the server name.