From bcb6d6e533204c6ab2c764a1d77c992bb88e943a Mon Sep 17 00:00:00 2001 From: Kiran Hart Date: Mon, 27 Sep 2021 15:05:23 -0400 Subject: [PATCH] 2.36.1 --- pom.xml | 2 +- .../auctionhouse/commands/CommandSell.java | 15 +++++++-------- .../guis/transaction/GUITransactionType.java | 4 ++-- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index 68c2e17..e647133 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ 4.0.0 ca.tweetzy auctionhouse - 2.36.0 + 2.36.1 UTF-8 diff --git a/src/main/java/ca/tweetzy/auctionhouse/commands/CommandSell.java b/src/main/java/ca/tweetzy/auctionhouse/commands/CommandSell.java index 2f0ee8a..4cee829 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/commands/CommandSell.java +++ b/src/main/java/ca/tweetzy/auctionhouse/commands/CommandSell.java @@ -14,15 +14,12 @@ import ca.tweetzy.core.compatibility.XMaterial; import ca.tweetzy.core.utils.NumberUtils; import ca.tweetzy.core.utils.PlayerUtils; import ca.tweetzy.core.utils.nms.NBTEditor; -import com.sun.prism.shader.Texture_ImagePattern_Loader; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; -import java.util.ArrayList; import java.util.Arrays; -import java.util.Collections; import java.util.List; import java.util.stream.Collectors; @@ -212,12 +209,14 @@ public final class CommandSell extends AbstractCommand { if (!Settings.ALLOW_ITEM_BUNDLES.getBoolean() && isBundle) { return ReturnType.FAILURE; } else { - if (NBTEditor.contains(itemToSell, "AuctionBundleItem")) { - AuctionHouse.getInstance().getLocale().getMessage("general.cannotsellbundleditem").sendPrefixedMessage(player); - return ReturnType.FAILURE; - } + if (isBundle) { + if (NBTEditor.contains(itemToSell, "AuctionBundleItem")) { + AuctionHouse.getInstance().getLocale().getMessage("general.cannotsellbundleditem").sendPrefixedMessage(player); + return ReturnType.FAILURE; + } - itemToSell = AuctionAPI.getInstance().createBundledItem(itemToSell, AuctionAPI.getInstance().getSimilarItemsFromInventory(player, itemToSell).toArray(new ItemStack[0])); + itemToSell = AuctionAPI.getInstance().createBundledItem(itemToSell, AuctionAPI.getInstance().getSimilarItemsFromInventory(player, itemToSell).toArray(new ItemStack[0])); + } } final boolean buyNowAllow = Settings.ALLOW_USAGE_OF_BUY_NOW_SYSTEM.getBoolean(); diff --git a/src/main/java/ca/tweetzy/auctionhouse/guis/transaction/GUITransactionType.java b/src/main/java/ca/tweetzy/auctionhouse/guis/transaction/GUITransactionType.java index d9b3fdb..afd5a6d 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/guis/transaction/GUITransactionType.java +++ b/src/main/java/ca/tweetzy/auctionhouse/guis/transaction/GUITransactionType.java @@ -17,7 +17,7 @@ public final class GUITransactionType extends Gui { public GUITransactionType() { setTitle(TextUtils.formatText(Settings.GUI_TRANSACTIONS_TYPE_TITLE.getString())); - setRows(5); + setRows(4); setAcceptsItems(false); setUseLockedCells(true); setDefaultItem(Settings.GUI_TRANSACTIONS_TYPE_BG_ITEM.getMaterial().parseItem()); @@ -34,6 +34,6 @@ public final class GUITransactionType extends Gui { e.manager.showGUI(e.player, new GUITransactionList(e.player, false)); }); - setButton(4, 0, ConfigurationItemHelper.createConfigurationItem(Settings.GUI_BACK_BTN_ITEM.getString(), Settings.GUI_BACK_BTN_NAME.getString(), Settings.GUI_BACK_BTN_LORE.getStringList(), null), e -> e.manager.showGUI(e.player, new GUIAuctionHouse(AuctionHouse.getInstance().getAuctionPlayerManager().getPlayer(e.player.getUniqueId())))); + setButton(3, 0, ConfigurationItemHelper.createConfigurationItem(Settings.GUI_BACK_BTN_ITEM.getString(), Settings.GUI_BACK_BTN_NAME.getString(), Settings.GUI_BACK_BTN_LORE.getStringList(), null), e -> e.manager.showGUI(e.player, new GUIAuctionHouse(AuctionHouse.getInstance().getAuctionPlayerManager().getPlayer(e.player.getUniqueId())))); } }