Class ARecent
java.lang.Object
com.olziedev.playerauctions.api.auction.Auction
com.olziedev.playerauctions.api.auction.recent.ARecent
Represents a recent auction for a player that can manage and handle basic data within the auction.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a bidder.voidPurchases this auction.abstract voidRemoves the auction from the players recent.abstract APlayerabstract ACurrencyRetrieve the currency for this auction.longabstract longgetID()abstract ItemStackgetItem()abstract longdoubleabstract StringgetPrettyItemName(boolean showDisplayName) abstract ItemStack[]getPreviewItems(boolean filter) abstract doublegetPrice()abstract RecentAuctionTypegetType()booleanbooleanvoidremoveAuction(PlayerAuctionRemoveEvent.Cause cause, Consumer<AuctionResponse> runnable, CommandSender sender) Removes the auction from the server.voidsetAuctionPlayer(APlayer auctionPlayer) Modifies the auction owner.voidsetExpireTime(Long expire, Consumer<AuctionResponse> runnable, Player player) Modifies the expiry time when the auction should expire.abstract voidsetPrice(double price) abstract voidsetProduct(ASerializableProduct<?> serializableProduct, long amount) Modifies the item stack of the auction.Methods inherited from class com.olziedev.playerauctions.api.auction.Auction
getAuctionDate, getAuctionServer, getBuyPrice, getInternalCurrency, getRandomSort, getSerializableProduct, getUUID, getWorld, isUnlimited, replaceLore, setRandomSort
-
Constructor Details
-
ARecent
public ARecent()
-
-
Method Details
-
getID
public abstract long getID() -
getPrice
public abstract double getPrice() -
getCurrency
Retrieve the currency for this auction.- Specified by:
getCurrencyin classAuction- Returns:
- The type of currency that this auction was chosen to use.
-
getAuctionPlayer
- Specified by:
getAuctionPlayerin classAuction- Returns:
- The owner of this auction.
-
getItem
-
getPrettyItemName
- Specified by:
getPrettyItemNamein classAuction- Parameters:
showDisplayName- If item has a display name, it'll return the item name. (coloured)- Returns:
- The pretty item name.
-
getType
- Returns:
- The type of recent the auction is.
-
getItemAmount
public abstract long getItemAmount()- Specified by:
getItemAmountin classAuction- Returns:
- The amount of items that the auction has.
-
setProduct
Modifies the item stack of the auction.- Specified by:
setProductin classAuction- Parameters:
serializableProduct- The product of the auction.amount- The amount for the auction item.
-
setPrice
public abstract void setPrice(double price) -
deleteAuction
public abstract void deleteAuction()Removes the auction from the players recent. -
getPreviewItems
- Specified by:
getPreviewItemsin classAuction- Parameters:
filter- Should it remove air items from the returned array.- Returns:
- The array of the preview items for that auction.
-
getOriginalPrice
public double getOriginalPrice()- Specified by:
getOriginalPricein classAuction- Returns:
- The price it was originally sold as, before the plugin modified the value.
-
getAuctionCategories
- Specified by:
getAuctionCategoriesin classAuction- Returns:
- The categories of this auction based off the item.
-
getExpireTime
public long getExpireTime()- Specified by:
getExpireTimein classAuction- Returns:
- The time when the auction will expire in milliseconds.
-
hasExpired
public boolean hasExpired()- Specified by:
hasExpiredin classAuction- Returns:
- If the auction has expired.
-
setExpireTime
Description copied from class:AuctionModifies the expiry time when the auction should expire.- Specified by:
setExpireTimein classAuction- Parameters:
expire- The amount of time the auction should expire.runnable- The callback when the method is done.player- The player that set the expiry time.
-
setAuctionPlayer
Description copied from class:AuctionModifies the auction owner.- Specified by:
setAuctionPlayerin classAuction- Parameters:
auctionPlayer- The new auction owner.
-
isBidding
public boolean isBidding() -
addBidder
Description copied from class:AuctionAdds a bidder. -
getBidder
-
buy
Description copied from class:AuctionPurchases this auction. -
removeAuction
public void removeAuction(PlayerAuctionRemoveEvent.Cause cause, Consumer<AuctionResponse> runnable, CommandSender sender) Description copied from class:AuctionRemoves the auction from the server.- Specified by:
removeAuctionin classAuction- Parameters:
cause- What caused the auction to be removed for thePlayerAuctionRemoveEventevent.runnable- The callback when the method is done.sender- The user who removed the auction.
-