mirror of
https://github.com/kiranhart/Auction-House.git
synced 2025-01-09 13:07:41 +01:00
fix bug where when listing tax is enabled w/confirmation listing, if the player doesn't have enough money to complete listing it dupes the item.
Took 2 minutes
This commit is contained in:
parent
416003b410
commit
553a290484
@ -354,6 +354,7 @@ public final class CommandSell extends AbstractCommand {
|
|||||||
|
|
||||||
AuctionCreator.create(auctionPlayer, auctionedItem, (auction, listingResult) -> {
|
AuctionCreator.create(auctionPlayer, auctionedItem, (auction, listingResult) -> {
|
||||||
if (listingResult != ListingResult.SUCCESS) {
|
if (listingResult != ListingResult.SUCCESS) {
|
||||||
|
player.closeInventory();
|
||||||
PlayerUtils.giveItem(player, auction.getItem());
|
PlayerUtils.giveItem(player, auction.getItem());
|
||||||
auctionPlayer.setItemBeingListed(null);
|
auctionPlayer.setItemBeingListed(null);
|
||||||
return;
|
return;
|
||||||
|
@ -335,6 +335,7 @@ public final class GUISellAuction extends AbstractPlaceholderGui {
|
|||||||
private void performAuctionListing(GuiClickEvent click) {
|
private void performAuctionListing(GuiClickEvent click) {
|
||||||
AuctionCreator.create(this.auctionPlayer, createListingItem(), (originalListing, listingResult) -> {
|
AuctionCreator.create(this.auctionPlayer, createListingItem(), (originalListing, listingResult) -> {
|
||||||
if (listingResult != ListingResult.SUCCESS) {
|
if (listingResult != ListingResult.SUCCESS) {
|
||||||
|
click.player.closeInventory();
|
||||||
PlayerUtils.giveItem(click.player, originalListing.getItem());
|
PlayerUtils.giveItem(click.player, originalListing.getItem());
|
||||||
this.auctionPlayer.setItemBeingListed(null);
|
this.auctionPlayer.setItemBeingListed(null);
|
||||||
return;
|
return;
|
||||||
|
@ -209,6 +209,7 @@ public final class GUISellBin extends AbstractPlaceholderGui {
|
|||||||
private void performAuctionListing(GuiClickEvent click) {
|
private void performAuctionListing(GuiClickEvent click) {
|
||||||
AuctionCreator.create(this.auctionPlayer, createListingItem(), (originalListing, listingResult) -> {
|
AuctionCreator.create(this.auctionPlayer, createListingItem(), (originalListing, listingResult) -> {
|
||||||
if (listingResult != ListingResult.SUCCESS) {
|
if (listingResult != ListingResult.SUCCESS) {
|
||||||
|
click.player.closeInventory();
|
||||||
PlayerUtils.giveItem(click.player, originalListing.getItem());
|
PlayerUtils.giveItem(click.player, originalListing.getItem());
|
||||||
this.auctionPlayer.setItemBeingListed(null);
|
this.auctionPlayer.setItemBeingListed(null);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user