diff --git a/pom.xml b/pom.xml index 651f2ef..a9f4f9f 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ 4.0.0 ca.tweetzy auctionhouse - 2.49.0 + 2.50.0 UTF-8 diff --git a/src/main/java/ca/tweetzy/auctionhouse/guis/GUIExpiredItems.java b/src/main/java/ca/tweetzy/auctionhouse/guis/GUIExpiredItems.java index fbae783..6d2073f 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/guis/GUIExpiredItems.java +++ b/src/main/java/ca/tweetzy/auctionhouse/guis/GUIExpiredItems.java @@ -68,10 +68,17 @@ public class GUIExpiredItems extends Gui { setButton(5, 1, ConfigurationItemHelper.createConfigurationItem(Settings.GUI_EXPIRED_AUCTIONS_ITEM.getString(), Settings.GUI_EXPIRED_AUCTIONS_NAME.getString(), Settings.GUI_EXPIRED_AUCTIONS_LORE.getStringList(), null), e -> { + for (AuctionedItem auctionItem : data) { + if (e.player.getInventory().firstEmpty() == -1) { + AuctionHouse.getInstance().getLocale().getMessage("general.noroomclaim").sendPrefixedMessage(e.player); + break; + } + PlayerUtils.giveItem(e.player, auctionItem.getItem()); AuctionHouse.getInstance().getAuctionItemManager().sendToGarbage(auctionItem); } + draw(); }); diff --git a/src/main/java/ca/tweetzy/auctionhouse/settings/LocaleSettings.java b/src/main/java/ca/tweetzy/auctionhouse/settings/LocaleSettings.java index b458891..ecc3594 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/settings/LocaleSettings.java +++ b/src/main/java/ca/tweetzy/auctionhouse/settings/LocaleSettings.java @@ -31,6 +31,7 @@ public class LocaleSettings { languageNodes.put("general.blocked", "&cSorry, you are not allowed to sell &e%item%"); languageNodes.put("general.sellinglimit", "&cYou cannot sell more items, please remove/sell current active items"); languageNodes.put("general.noroom", "&cPlease clear room in your inventory to purchase that item."); + languageNodes.put("general.noroomclaim", "&cYou do not have enough space in your inventory"); languageNodes.put("general.buynowdisabledonitem", "&cBuy now is disabled on this item."); languageNodes.put("general.endedallauctions", "&cYou force ended all active auctions"); languageNodes.put("general.relisteditems", "&aYou relisted all expired items!");