mirror of
https://github.com/kiranhart/Auction-House.git
synced 2024-11-22 05:25:11 +01:00
🐛 fix bug where players can't use /ah sell after their first sell w.o relogging (caused by setting regarding opening main ah gui after confirm/list)
Took 1 minute
This commit is contained in:
parent
f6f5a8bc07
commit
85ec3f32d7
@ -369,9 +369,10 @@ public final class CommandSell extends AbstractCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Settings.OPEN_MAIN_AUCTION_HOUSE_AFTER_MENU_LIST.getBoolean())
|
||||
if (Settings.OPEN_MAIN_AUCTION_HOUSE_AFTER_MENU_LIST.getBoolean()) {
|
||||
player.removeMetadata("AuctionHouseConfirmListing", AuctionHouse.getInstance());
|
||||
instance.getGuiManager().showGUI(player, new GUIAuctionHouse(auctionPlayer));
|
||||
else
|
||||
} else
|
||||
AuctionHouse.newChain().sync(player::closeInventory).execute();
|
||||
});
|
||||
|
||||
@ -394,9 +395,10 @@ public final class CommandSell extends AbstractCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Settings.OPEN_MAIN_AUCTION_HOUSE_AFTER_MENU_LIST.getBoolean())
|
||||
if (Settings.OPEN_MAIN_AUCTION_HOUSE_AFTER_MENU_LIST.getBoolean()) {
|
||||
player.removeMetadata("AuctionHouseConfirmListing", AuctionHouse.getInstance());
|
||||
instance.getGuiManager().showGUI(player, new GUIAuctionHouse(auctionPlayer));
|
||||
else
|
||||
} else
|
||||
AuctionHouse.newChain().sync(player::closeInventory).execute();
|
||||
});
|
||||
|
||||
|
@ -58,7 +58,7 @@ public final class GUIBundleCreation extends AbstractPlaceholderGui {
|
||||
for (int i = 0; i < 45; i++)
|
||||
setItem(i, CompMaterial.AIR.parseItem());
|
||||
|
||||
Arrays.asList(45, 46, 47, 48, 49,50, 51, 52, 53).forEach(i -> setAction(i, e -> e.event.setCancelled(true)));
|
||||
Arrays.asList(45, 46, 47, 48, 49, 50, 51, 52, 53).forEach(i -> setAction(i, e -> e.event.setCancelled(true)));
|
||||
|
||||
setOnClose(close -> {
|
||||
for (int i = 0; i < 45; i++) {
|
||||
@ -144,9 +144,10 @@ public final class GUIBundleCreation extends AbstractPlaceholderGui {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Settings.OPEN_MAIN_AUCTION_HOUSE_AFTER_MENU_LIST.getBoolean())
|
||||
if (Settings.OPEN_MAIN_AUCTION_HOUSE_AFTER_MENU_LIST.getBoolean()) {
|
||||
player.removeMetadata("AuctionHouseConfirmListing", AuctionHouse.getInstance());
|
||||
instance.getGuiManager().showGUI(auctionPlayer.getPlayer(), new GUIAuctionHouse(auctionPlayer));
|
||||
else
|
||||
} else
|
||||
AuctionHouse.newChain().sync(player::closeInventory).execute();
|
||||
});
|
||||
}));
|
||||
@ -159,9 +160,10 @@ public final class GUIBundleCreation extends AbstractPlaceholderGui {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Settings.OPEN_MAIN_AUCTION_HOUSE_AFTER_MENU_LIST.getBoolean())
|
||||
if (Settings.OPEN_MAIN_AUCTION_HOUSE_AFTER_MENU_LIST.getBoolean()) {
|
||||
player.removeMetadata("AuctionHouseConfirmListing", AuctionHouse.getInstance());
|
||||
instance.getGuiManager().showGUI(auctionPlayer.getPlayer(), new GUIAuctionHouse(auctionPlayer));
|
||||
else
|
||||
} else
|
||||
AuctionHouse.newChain().sync(player::closeInventory).execute();
|
||||
});
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ public final class GUISellAuction extends AbstractPlaceholderGui {
|
||||
string = ChatColor.stripColor(string);
|
||||
|
||||
if (!NumberUtils.isDouble(string)) {
|
||||
AuctionHouse.getInstance().getLocale().getMessage("general.notanumber").processPlaceholder("value", string).sendPrefixedMessage(player);
|
||||
AuctionHouse.getInstance().getLocale().getMessage("general.notanumber").processPlaceholder("value", string).sendPrefixedMessage(player);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -213,7 +213,7 @@ public final class GUISellAuction extends AbstractPlaceholderGui {
|
||||
string = ChatColor.stripColor(string);
|
||||
|
||||
if (!NumberUtils.isDouble(string)) {
|
||||
AuctionHouse.getInstance().getLocale().getMessage("general.notanumber").processPlaceholder("value", string).sendPrefixedMessage(player);
|
||||
AuctionHouse.getInstance().getLocale().getMessage("general.notanumber").processPlaceholder("value", string).sendPrefixedMessage(player);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -263,7 +263,7 @@ public final class GUISellAuction extends AbstractPlaceholderGui {
|
||||
string = ChatColor.stripColor(string);
|
||||
|
||||
if (!NumberUtils.isDouble(string)) {
|
||||
AuctionHouse.getInstance().getLocale().getMessage("general.notanumber").processPlaceholder("value", string).sendPrefixedMessage(player);
|
||||
AuctionHouse.getInstance().getLocale().getMessage("general.notanumber").processPlaceholder("value", string).sendPrefixedMessage(player);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -299,7 +299,7 @@ public final class GUISellAuction extends AbstractPlaceholderGui {
|
||||
.make(), click -> {
|
||||
|
||||
if (!AuctionAPI.getInstance().meetsListingRequirements(click.player, this.auctionPlayer.getItemBeingListed())) return;
|
||||
if (!auctionPlayer.canListItem()) return;
|
||||
if (!auctionPlayer.canListItem()) return;
|
||||
|
||||
click.gui.exit();
|
||||
|
||||
@ -343,9 +343,10 @@ public final class GUISellAuction extends AbstractPlaceholderGui {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Settings.OPEN_MAIN_AUCTION_HOUSE_AFTER_MENU_LIST.getBoolean())
|
||||
if (Settings.OPEN_MAIN_AUCTION_HOUSE_AFTER_MENU_LIST.getBoolean()) {
|
||||
player.removeMetadata("AuctionHouseConfirmListing", AuctionHouse.getInstance());
|
||||
click.manager.showGUI(click.player, new GUIAuctionHouse(this.auctionPlayer));
|
||||
else
|
||||
} else
|
||||
AuctionHouse.newChain().sync(click.player::closeInventory).execute();
|
||||
});
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ public final class GUISellBin extends AbstractPlaceholderGui {
|
||||
string = ChatColor.stripColor(string);
|
||||
|
||||
if (!NumberUtils.isDouble(string)) {
|
||||
AuctionHouse.getInstance().getLocale().getMessage("general.notanumber").processPlaceholder("value", string).sendPrefixedMessage(player);
|
||||
AuctionHouse.getInstance().getLocale().getMessage("general.notanumber").processPlaceholder("value", string).sendPrefixedMessage(player);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -187,7 +187,7 @@ public final class GUISellBin extends AbstractPlaceholderGui {
|
||||
.make(), click -> {
|
||||
|
||||
if (!AuctionAPI.getInstance().meetsListingRequirements(click.player, this.auctionPlayer.getItemBeingListed())) return;
|
||||
if (!auctionPlayer.canListItem()) return;
|
||||
if (!auctionPlayer.canListItem()) return;
|
||||
|
||||
click.gui.exit();
|
||||
|
||||
@ -218,9 +218,10 @@ public final class GUISellBin extends AbstractPlaceholderGui {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Settings.OPEN_MAIN_AUCTION_HOUSE_AFTER_MENU_LIST.getBoolean())
|
||||
if (Settings.OPEN_MAIN_AUCTION_HOUSE_AFTER_MENU_LIST.getBoolean()) {
|
||||
player.removeMetadata("AuctionHouseConfirmListing", AuctionHouse.getInstance());
|
||||
click.manager.showGUI(click.player, new GUIAuctionHouse(this.auctionPlayer));
|
||||
else
|
||||
} else
|
||||
AuctionHouse.newChain().sync(click.player::closeInventory).execute();
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user