From 9cbc501bdb38cd99dc2bc72c3154220cbb00457c Mon Sep 17 00:00:00 2001 From: Kiran Hart Date: Tue, 20 Jun 2023 19:30:56 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20import=20cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Took 27 seconds --- .../auctionhouse/guis/GUIPaymentCollection.java | 2 +- .../tweetzy/auctionhouse/guis/sell/GUISellAuction.java | 10 +++++----- .../auctionhouse/guis/sell/GUISellListingType.java | 6 +++--- .../auctionhouse/guis/sell/GUISellPlaceItem.java | 2 +- .../guis/statistics/GUIStatisticLeaderboard.java | 4 ++-- .../guis/statistics/GUIStatisticViewSelect.java | 4 ++-- .../guis/transaction/GUITransactionList.java | 2 +- .../auctionhouse/listeners/PlayerListeners.java | 2 -- 8 files changed, 15 insertions(+), 17 deletions(-) diff --git a/src/main/java/ca/tweetzy/auctionhouse/guis/GUIPaymentCollection.java b/src/main/java/ca/tweetzy/auctionhouse/guis/GUIPaymentCollection.java index fad127e..6bccc1c 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/guis/GUIPaymentCollection.java +++ b/src/main/java/ca/tweetzy/auctionhouse/guis/GUIPaymentCollection.java @@ -77,7 +77,7 @@ public class GUIPaymentCollection extends AbstractPlaceholderGui { setOnPage(e -> draw()); - setButton(5, 1, ConfigurationItemHelper.createConfigurationItem(this.player, + setButton(5, 1, ConfigurationItemHelper.createConfigurationItem(this.player, Settings.GUI_PAYMENT_COLLECTION_ITEM.getString(), PlaceholderAPIHook.PAPIReplacer.tryReplace(this.player, Settings.GUI_PAYMENT_COLLECTION_NAME.getString()), PlaceholderAPIHook.PAPIReplacer.tryReplace(this.player, Settings.GUI_PAYMENT_COLLECTION_LORE.getStringList()), null), e -> { diff --git a/src/main/java/ca/tweetzy/auctionhouse/guis/sell/GUISellAuction.java b/src/main/java/ca/tweetzy/auctionhouse/guis/sell/GUISellAuction.java index 6883ab4..d6292f2 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/guis/sell/GUISellAuction.java +++ b/src/main/java/ca/tweetzy/auctionhouse/guis/sell/GUISellAuction.java @@ -147,7 +147,7 @@ public final class GUISellAuction extends AbstractPlaceholderGui { if (this.allowBuyNow) if (Settings.ALLOW_USAGE_OF_BUY_NOW_SYSTEM.getBoolean()) - setButton(3, 4, ConfigurationItemHelper.createConfigurationItem(this.player, + setButton(3, 4, ConfigurationItemHelper.createConfigurationItem(this.player, Settings.GUI_SELL_AUCTION_ITEM_ITEMS_BUYOUT_PRICE_ITEM.getString(), Settings.GUI_SELL_AUCTION_ITEM_ITEMS_BUYOUT_PRICE_NAME.getString(), Settings.GUI_SELL_AUCTION_ITEM_ITEMS_BUYOUT_PRICE_LORE.getStringList(), @@ -196,7 +196,7 @@ public final class GUISellAuction extends AbstractPlaceholderGui { }); - setButton(3, 3, ConfigurationItemHelper.createConfigurationItem(this.player, + setButton(3, 3, ConfigurationItemHelper.createConfigurationItem(this.player, Settings.GUI_SELL_AUCTION_ITEM_ITEMS_STARTING_PRICE_ITEM.getString(), Settings.GUI_SELL_AUCTION_ITEM_ITEMS_STARTING_PRICE_NAME.getString(), Settings.GUI_SELL_AUCTION_ITEM_ITEMS_STARTING_PRICE_LORE.getStringList(), @@ -253,7 +253,7 @@ public final class GUISellAuction extends AbstractPlaceholderGui { }; }); - setButton(3, 5, ConfigurationItemHelper.createConfigurationItem(this.player, + setButton(3, 5, ConfigurationItemHelper.createConfigurationItem(this.player, Settings.GUI_SELL_AUCTION_ITEM_ITEMS_INCREMENT_PRICE_ITEM.getString(), Settings.GUI_SELL_AUCTION_ITEM_ITEMS_INCREMENT_PRICE_NAME.getString(), Settings.GUI_SELL_AUCTION_ITEM_ITEMS_INCREMENT_PRICE_LORE.getStringList(), @@ -304,7 +304,7 @@ public final class GUISellAuction extends AbstractPlaceholderGui { drawAuctionItem(); drawBuyoutToggle(); - setButton(getRows() - 1, 4, ConfigurationItemHelper.createConfigurationItem(this.player, + setButton(getRows() - 1, 4, ConfigurationItemHelper.createConfigurationItem(this.player, Settings.GUI_SELL_AUCTION_ITEM_ITEMS_CONTINUE_ITEM.getString(), Settings.GUI_SELL_AUCTION_ITEM_ITEMS_CONTINUE_NAME.getString(), Settings.GUI_SELL_AUCTION_ITEM_ITEMS_CONTINUE_LORE.getStringList(), @@ -335,7 +335,7 @@ public final class GUISellAuction extends AbstractPlaceholderGui { private void drawBuyoutToggle() { if (Settings.ALLOW_USAGE_OF_BUY_NOW_SYSTEM.getBoolean()) { - setButton(3, 7, ConfigurationItemHelper.createConfigurationItem(this.player, + setButton(3, 7, ConfigurationItemHelper.createConfigurationItem(this.player, this.allowBuyNow ? Settings.GUI_SELL_AUCTION_ITEM_ITEMS_BUYOUT_ENABLED_ITEM.getString() : Settings.GUI_SELL_AUCTION_ITEM_ITEMS_BUYOUT_DISABLED_ITEM.getString(), this.allowBuyNow ? Settings.GUI_SELL_AUCTION_ITEM_ITEMS_BUYOUT_ENABLED_NAME.getString() : Settings.GUI_SELL_AUCTION_ITEM_ITEMS_BUYOUT_DISABLED_NAME.getString(), this.allowBuyNow ? Settings.GUI_SELL_AUCTION_ITEM_ITEMS_BUYOUT_ENABLED_LORE.getStringList() : Settings.GUI_SELL_AUCTION_ITEM_ITEMS_BUYOUT_DISABLED_LORE.getStringList(), diff --git a/src/main/java/ca/tweetzy/auctionhouse/guis/sell/GUISellListingType.java b/src/main/java/ca/tweetzy/auctionhouse/guis/sell/GUISellListingType.java index 8b38c0c..c62fe76 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/guis/sell/GUISellListingType.java +++ b/src/main/java/ca/tweetzy/auctionhouse/guis/sell/GUISellListingType.java @@ -55,7 +55,7 @@ public final class GUISellListingType extends AbstractPlaceholderGui { drawBinButton(2); } - setButton(getRows() - 1, 0, ConfigurationItemHelper.createConfigurationItem(this.player, + setButton(getRows() - 1, 0, ConfigurationItemHelper.createConfigurationItem(this.player, Settings.GUI_SELL_LISTING_TYPE_ITEMS_RETURN_ITEM.getString(), Settings.GUI_SELL_LISTING_TYPE_ITEMS_RETURN_NAME.getString(), Settings.GUI_SELL_LISTING_TYPE_ITEMS_RETURN_LORE.getStringList(), @@ -65,7 +65,7 @@ public final class GUISellListingType extends AbstractPlaceholderGui { } private void drawAuctionButton(int col) { - setButton(1, col, ConfigurationItemHelper.createConfigurationItem(this.player, + setButton(1, col, ConfigurationItemHelper.createConfigurationItem(this.player, Settings.GUI_SELL_LISTING_TYPE_ITEMS_AUCTION_ITEM.getString(), Settings.GUI_SELL_LISTING_TYPE_ITEMS_AUCTION_NAME.getString(), Settings.GUI_SELL_LISTING_TYPE_ITEMS_AUCTION_LORE.getStringList(), @@ -78,7 +78,7 @@ public final class GUISellListingType extends AbstractPlaceholderGui { } private void drawBinButton(int col) { - setButton(1, col, ConfigurationItemHelper.createConfigurationItem(this.player, + setButton(1, col, ConfigurationItemHelper.createConfigurationItem(this.player, Settings.GUI_SELL_LISTING_TYPE_ITEMS_BIN_ITEM.getString(), Settings.GUI_SELL_LISTING_TYPE_ITEMS_BIN_NAME.getString(), Settings.GUI_SELL_LISTING_TYPE_ITEMS_BIN_LORE.getStringList(), diff --git a/src/main/java/ca/tweetzy/auctionhouse/guis/sell/GUISellPlaceItem.java b/src/main/java/ca/tweetzy/auctionhouse/guis/sell/GUISellPlaceItem.java index a080832..317834f 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/guis/sell/GUISellPlaceItem.java +++ b/src/main/java/ca/tweetzy/auctionhouse/guis/sell/GUISellPlaceItem.java @@ -98,7 +98,7 @@ public final class GUISellPlaceItem extends AbstractPlaceholderGui { } }); - setButton(getRows() - 1, 4, ConfigurationItemHelper.createConfigurationItem(this.player, + setButton(getRows() - 1, 4, ConfigurationItemHelper.createConfigurationItem(this.player, Settings.GUI_SELL_PLACE_ITEM_ITEMS_CONTINUE_ITEM.getString(), Settings.GUI_SELL_PLACE_ITEM_ITEMS_CONTINUE_NAME.getString(), Settings.GUI_SELL_PLACE_ITEM_ITEMS_CONTINUE_LORE.getStringList(), diff --git a/src/main/java/ca/tweetzy/auctionhouse/guis/statistics/GUIStatisticLeaderboard.java b/src/main/java/ca/tweetzy/auctionhouse/guis/statistics/GUIStatisticLeaderboard.java index 1a0758e..adacea7 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/guis/statistics/GUIStatisticLeaderboard.java +++ b/src/main/java/ca/tweetzy/auctionhouse/guis/statistics/GUIStatisticLeaderboard.java @@ -78,7 +78,7 @@ public final class GUIStatisticLeaderboard extends AbstractPlaceholderGui { final ItemStack head = AuctionAPI.getInstance().getPlayerHead(targetUser.getName()); - setItem(slot++, ConfigurationItemHelper.createConfigurationItem(this.player, + setItem(slot++, ConfigurationItemHelper.createConfigurationItem(this.player, head, Settings.GUI_STATS_LEADERBOARD_ITEMS_PLAYER_NAME.getString(), Settings.GUI_STATS_LEADERBOARD_ITEMS_PLAYER_LORE.getStringList(), @@ -105,7 +105,7 @@ public final class GUIStatisticLeaderboard extends AbstractPlaceholderGui { } private void drawStatisticTypeButton() { - setButton(5, 4, ConfigurationItemHelper.createConfigurationItem(this.player, + setButton(5, 4, ConfigurationItemHelper.createConfigurationItem(this.player, Settings.GUI_STATS_LEADERBOARD_ITEMS_STAT_ITEM.getString(), Settings.GUI_STATS_LEADERBOARD_ITEMS_STAT_NAME.getString(), Settings.GUI_STATS_LEADERBOARD_ITEMS_STAT_LORE.getStringList(), new HashMap() {{ diff --git a/src/main/java/ca/tweetzy/auctionhouse/guis/statistics/GUIStatisticViewSelect.java b/src/main/java/ca/tweetzy/auctionhouse/guis/statistics/GUIStatisticViewSelect.java index cafac3e..ed239e4 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/guis/statistics/GUIStatisticViewSelect.java +++ b/src/main/java/ca/tweetzy/auctionhouse/guis/statistics/GUIStatisticViewSelect.java @@ -45,7 +45,7 @@ public final class GUIStatisticViewSelect extends AbstractPlaceholderGui { private void draw() { // self - setButton(1, 2, ConfigurationItemHelper.createConfigurationItem(this.player, + setButton(1, 2, ConfigurationItemHelper.createConfigurationItem(this.player, Settings.GUI_STATS_VIEW_SELECT_ITEMS_PERSONAL_USE_HEAD.getBoolean() ? AuctionAPI.getInstance().getPlayerHead(this.player.getName()) : XMaterial.matchXMaterial(Settings.GUI_STATS_VIEW_SELECT_ITEMS_PERSONAL_ITEM.getString()).orElse(XMaterial.STONE).parseItem(), Settings.GUI_STATS_VIEW_SELECT_ITEMS_PERSONAL_NAME.getString(), @@ -53,7 +53,7 @@ public final class GUIStatisticViewSelect extends AbstractPlaceholderGui { null ), click -> click.manager.showGUI(click.player, new GUIStatisticSelf(this.auctionPlayer))); - setButton(1, 6, ConfigurationItemHelper.createConfigurationItem(this.player, + setButton(1, 6, ConfigurationItemHelper.createConfigurationItem(this.player, XMaterial.matchXMaterial(Settings.GUI_STATS_VIEW_SELECT_ITEMS_LEADERBOARD_ITEM.getString()).orElse(XMaterial.STONE).parseItem(), Settings.GUI_STATS_VIEW_SELECT_ITEMS_LEADERBOARD_NAME.getString(), Settings.GUI_STATS_VIEW_SELECT_ITEMS_LEADERBOARD_LORE.getStringList(), diff --git a/src/main/java/ca/tweetzy/auctionhouse/guis/transaction/GUITransactionList.java b/src/main/java/ca/tweetzy/auctionhouse/guis/transaction/GUITransactionList.java index 7447cd0..05daf5e 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/guis/transaction/GUITransactionList.java +++ b/src/main/java/ca/tweetzy/auctionhouse/guis/transaction/GUITransactionList.java @@ -139,7 +139,7 @@ public class GUITransactionList extends AbstractPlaceholderGui { Settings.GUI_TRANSACTIONS_ITEMS_FILTER_ITEM.getString(), Settings.GUI_TRANSACTIONS_ITEMS_FILTER_NAME.getString(), Settings.GUI_TRANSACTIONS_ITEMS_FILTER_LORE.getStringList(), - new HashMap(){{ + new HashMap() {{ put("%filter_category%", auctionPlayer.getSelectedTransactionFilter().getTranslatedType()); put("%filter_auction_type%", auctionPlayer.getSelectedTransactionSaleType().getTranslatedType()); put("%filter_sort_order%", auctionPlayer.getTransactionSortType().getTranslatedType()); diff --git a/src/main/java/ca/tweetzy/auctionhouse/listeners/PlayerListeners.java b/src/main/java/ca/tweetzy/auctionhouse/listeners/PlayerListeners.java index e258535..50d9def 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/listeners/PlayerListeners.java +++ b/src/main/java/ca/tweetzy/auctionhouse/listeners/PlayerListeners.java @@ -19,7 +19,6 @@ package ca.tweetzy.auctionhouse.listeners; import ca.tweetzy.auctionhouse.AuctionHouse; -import ca.tweetzy.auctionhouse.api.AuctionAPI; import ca.tweetzy.auctionhouse.api.UpdateChecker; import ca.tweetzy.auctionhouse.auction.AuctionPlayer; import ca.tweetzy.auctionhouse.guis.GUIAuctionHouse; @@ -45,7 +44,6 @@ import org.bukkit.event.block.Action; import org.bukkit.event.entity.PlayerDeathEvent; import org.bukkit.event.inventory.PrepareAnvilEvent; import org.bukkit.event.inventory.PrepareItemCraftEvent; -import org.bukkit.event.player.AsyncPlayerChatEvent; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerQuitEvent;