From 4c67437988b053381d224ba5a3b1180b199ac1c5 Mon Sep 17 00:00:00 2001 From: Kiran Hart Date: Wed, 10 May 2023 20:24:07 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=AB=20Finished=20bid=20clearing=20cmd,?= =?UTF-8?q?=20Closes=20#49?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Took 3 minutes --- .../java/ca/tweetzy/auctionhouse/commands/CommandAdmin.java | 4 ++-- .../ca/tweetzy/auctionhouse/listeners/PlayerListeners.java | 1 + .../java/ca/tweetzy/auctionhouse/settings/LocaleSettings.java | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/ca/tweetzy/auctionhouse/commands/CommandAdmin.java b/src/main/java/ca/tweetzy/auctionhouse/commands/CommandAdmin.java index 9858c3f..63db2f1 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/commands/CommandAdmin.java +++ b/src/main/java/ca/tweetzy/auctionhouse/commands/CommandAdmin.java @@ -151,7 +151,7 @@ public class CommandAdmin extends AbstractCommand { returnMoney = Boolean.parseBoolean(args[2]); handleUserBidClear(player, returnMoney); - + AuctionHouse.getInstance().getLocale().getMessage("general.admin.cleared bids").processPlaceholder("player", args[1]).sendPrefixedMessage(sender); break; case "opensell": if (args.length < 2) return ReturnType.FAILURE; @@ -213,7 +213,7 @@ public class CommandAdmin extends AbstractCommand { @Override protected List onTab(CommandSender sender, String... args) { - if (args.length == 1) return Arrays.asList("endall", "relistall", "logs", "viewexpired", "open", "clear"); + if (args.length == 1) return Arrays.asList("endall", "relistall", "logs", "viewexpired", "open", "clear", "clearbids"); if (args.length == 2 && args[0].equalsIgnoreCase("relistAll")) return Arrays.asList("1", "2", "3", "4", "5"); if (args.length == 2 && (args[0].equalsIgnoreCase("viewexpired") || args[0].equalsIgnoreCase("open"))) return Bukkit.getOnlinePlayers().stream().map(OfflinePlayer::getName).collect(Collectors.toList()); diff --git a/src/main/java/ca/tweetzy/auctionhouse/listeners/PlayerListeners.java b/src/main/java/ca/tweetzy/auctionhouse/listeners/PlayerListeners.java index 23431b0..26bcb98 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/listeners/PlayerListeners.java +++ b/src/main/java/ca/tweetzy/auctionhouse/listeners/PlayerListeners.java @@ -189,4 +189,5 @@ public class PlayerListeners implements Listener { stack = NBTEditor.set(stack, "AUCTION_REPAIRED", "AuctionHouseRepaired"); event.setResult(stack); } + } diff --git a/src/main/java/ca/tweetzy/auctionhouse/settings/LocaleSettings.java b/src/main/java/ca/tweetzy/auctionhouse/settings/LocaleSettings.java index c66e786..73b6db0 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/settings/LocaleSettings.java +++ b/src/main/java/ca/tweetzy/auctionhouse/settings/LocaleSettings.java @@ -91,6 +91,7 @@ public class LocaleSettings { languageNodes.put("general.qtybuydisabled", "&4%item_owner%&c is only accepting purchases of the entire stack."); languageNodes.put("general.invalid bid amount", "&cBid either too low or too high"); languageNodes.put("general.invalid deletion range", "&cPlease enter a valid deletion range"); + languageNodes.put("general.admin.cleared bids", "&aSuccessfully cleared any bids for the player&F: &e%player%"); languageNodes.put("pricing.minbaseprice", "&cThe minimum base price must be &a$%price%");