From 4335fa75df208339383f67aff95e04f34ba5ca96 Mon Sep 17 00:00:00 2001 From: Kiran Hart Date: Wed, 23 Mar 2022 02:09:33 -0400 Subject: [PATCH] added more placeholders Took 10 seconds --- .../api/hook/PlaceholderAPIHook.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/main/java/ca/tweetzy/auctionhouse/api/hook/PlaceholderAPIHook.java b/src/main/java/ca/tweetzy/auctionhouse/api/hook/PlaceholderAPIHook.java index dae5b19..af37f06 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/api/hook/PlaceholderAPIHook.java +++ b/src/main/java/ca/tweetzy/auctionhouse/api/hook/PlaceholderAPIHook.java @@ -1,6 +1,7 @@ package ca.tweetzy.auctionhouse.api.hook; import ca.tweetzy.auctionhouse.AuctionHouse; +import ca.tweetzy.auctionhouse.api.AuctionAPI; import ca.tweetzy.auctionhouse.auction.AuctionPlayer; import lombok.experimental.UtilityClass; import me.clip.placeholderapi.PlaceholderAPI; @@ -67,6 +68,26 @@ public class PlaceholderAPIHook extends PlaceholderExpansion { return String.valueOf(auctionPlayer.getItems(true).size()); } + if (params.equalsIgnoreCase("total_money_earned")) { + return AuctionAPI.getInstance().formatNumber(AuctionHouse.getInstance().getAuctionStatManager().getPlayerStats(player).getEarned()); + } + + if (params.equalsIgnoreCase("total_money_spent")) { + return AuctionAPI.getInstance().formatNumber(AuctionHouse.getInstance().getAuctionStatManager().getPlayerStats(player).getSpent()); + } + + if (params.equalsIgnoreCase("total_items_listed")) { + return AuctionAPI.getInstance().formatNumber(AuctionHouse.getInstance().getAuctionStatManager().getPlayerStats(player).getCreated()); + } + + if (params.equalsIgnoreCase("total_items_expired")) { + return AuctionAPI.getInstance().formatNumber(AuctionHouse.getInstance().getAuctionStatManager().getPlayerStats(player).getExpired()); + } + + if (params.equalsIgnoreCase("total_items_sold")) { + return AuctionAPI.getInstance().formatNumber(AuctionHouse.getInstance().getAuctionStatManager().getPlayerStats(player).getSold()); + } + if (params.equalsIgnoreCase("server_active_auctions")) { return String.valueOf(AuctionHouse.getInstance().getAuctionItemManager().getItems().size()); }