mirror of
https://github.com/kiranhart/Auction-House.git
synced 2024-11-15 04:15:10 +01:00
parent
77af181a79
commit
48d005940e
@ -29,6 +29,7 @@ import ca.tweetzy.auctionhouse.AuctionHouse;
|
||||
public enum AuctionSortType {
|
||||
|
||||
RECENT("Recent"),
|
||||
OLDEST("Oldest"),
|
||||
PRICE("Price");
|
||||
|
||||
final String type;
|
||||
@ -43,6 +44,8 @@ public enum AuctionSortType {
|
||||
return AuctionHouse.getInstance().getLocale().getMessage("auction_filter.sort_order.price").getMessage();
|
||||
case RECENT:
|
||||
return AuctionHouse.getInstance().getLocale().getMessage("auction_filter.sort_order.recent").getMessage();
|
||||
case OLDEST:
|
||||
return AuctionHouse.getInstance().getLocale().getMessage("auction_filter.sort_order.oldest").getMessage();
|
||||
default:
|
||||
return getType();
|
||||
}
|
||||
|
@ -173,10 +173,10 @@ public class GUIAuctionHouse extends AbstractPlaceholderGui {
|
||||
|
||||
if (this.auctionPlayer.getAuctionSortType() == AuctionSortType.PRICE) {
|
||||
this.items = this.items.stream().sorted(Comparator.comparingDouble(AuctionedItem::getCurrentPrice).reversed()).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
if (this.auctionPlayer.getAuctionSortType() == AuctionSortType.RECENT) {
|
||||
}else if (this.auctionPlayer.getAuctionSortType() == AuctionSortType.RECENT) {
|
||||
this.items = this.items.stream().sorted(Comparator.comparingLong(AuctionedItem::getExpiresAt).reversed()).collect(Collectors.toList());
|
||||
}else if (this.auctionPlayer.getAuctionSortType() == AuctionSortType.OLDEST) {
|
||||
this.items = this.items.stream().sorted(Comparator.comparingLong(AuctionedItem::getExpiresAt)).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -170,6 +170,7 @@ public class LocaleSettings {
|
||||
languageNodes.put("auction_filter.categories.search", "Search");
|
||||
languageNodes.put("auction_filter.sort_order.recent", "Recent");
|
||||
languageNodes.put("auction_filter.sort_order.price", "Price");
|
||||
languageNodes.put("auction_filter.sort_order.oldest", "Oldest");
|
||||
|
||||
languageNodes.put("transaction_filter.buy_type.sold", "Sold");
|
||||
languageNodes.put("transaction_filter.buy_type.bought", "Bought");
|
||||
|
Loading…
Reference in New Issue
Block a user