Skip to content

Commit

Permalink
🛒 create cartItem for individual checkouts
Browse files Browse the repository at this point in the history
Took 26 seconds
  • Loading branch information
kiranhart committed Feb 22, 2024
1 parent 45fbae2 commit 61b53a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/ca/tweetzy/shops/gui/user/ShopContentsGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import ca.tweetzy.shops.api.shop.ShopContent;
import ca.tweetzy.shops.api.shop.ShopContentDisplayType;
import ca.tweetzy.shops.gui.ShopsPagedGUI;
import ca.tweetzy.shops.impl.cart.CartItem;
import ca.tweetzy.shops.settings.Settings;
import ca.tweetzy.shops.settings.Translations;
import lombok.NonNull;
Expand Down Expand Up @@ -129,7 +130,7 @@ protected ItemStack makeDisplayItem(ShopContent content) {
@Override
protected void onClick(ShopContent content, GuiClickEvent click) {
if (click.clickType == ClickType.LEFT)
click.manager.showGUI(click.player, new ShopCheckoutGUI(this, player, this.shop, content));
click.manager.showGUI(click.player, new ShopCheckoutGUI(this, player, this.shop, new CartItem(content, content.getMinimumPurchaseQty())));

if (click.clickType == ClickType.RIGHT) {
this.cart.addItem(content);
Expand Down

0 comments on commit 61b53a7

Please sign in to comment.