Skip to content

Commit aef7d97

Browse files
committed
add missing return statement
1 parent 1fcd533 commit aef7d97

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ public void buy(@NotNull UUID buyer, @NotNull Inventory buyerInventory,
313313
amount = amount * item.getAmount();
314314
if (amount < 0) {
315315
this.sell(buyer, buyerInventory, loc2Drop, -amount);
316+
return;
316317
}
317318
ItemStack[] contents = buyerInventory.getContents();
318319
if (this.isUnlimited()) {
@@ -626,6 +627,7 @@ public void sell(@NotNull UUID seller, @NotNull Inventory sellerInventory,
626627
amount = item.getAmount() * amount;
627628
if (amount < 0) {
628629
this.buy(seller, sellerInventory, loc2Drop, -amount);
630+
return;
629631
}
630632
// Items to drop on floor
631633
ArrayList<ItemStack> floor = new ArrayList<>(5);

0 commit comments

Comments
 (0)