mirror of
https://github.com/kiranhart/Auction-House.git
synced 2025-02-27 21:31:33 +01:00
fixed bug where players can claim items if inventory is full resulting in the item dropping to the floor.
Took 4 minutes
This commit is contained in:
parent
017d6ee9f7
commit
1627fad0e0
@ -86,6 +86,12 @@ public class GUIExpiredItems extends Gui {
|
|||||||
for (AuctionedItem auctionItem : data) {
|
for (AuctionedItem auctionItem : data) {
|
||||||
setButton(slot++, auctionItem.getItem(), ClickType.LEFT, e -> {
|
setButton(slot++, auctionItem.getItem(), ClickType.LEFT, e -> {
|
||||||
if (!Settings.ALLOW_INDIVIDUAL_ITEM_CLAIM.getBoolean()) return;
|
if (!Settings.ALLOW_INDIVIDUAL_ITEM_CLAIM.getBoolean()) return;
|
||||||
|
|
||||||
|
if (e.player.getInventory().firstEmpty() == -1) {
|
||||||
|
AuctionHouse.getInstance().getLocale().getMessage("general.noroomclaim").sendPrefixedMessage(e.player);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.lastClicked == null) {
|
if (this.lastClicked == null) {
|
||||||
this.lastClicked = System.currentTimeMillis() + Settings.CLAIM_MS_DELAY.getInt();
|
this.lastClicked = System.currentTimeMillis() + Settings.CLAIM_MS_DELAY.getInt();
|
||||||
} else if (this.lastClicked > System.currentTimeMillis()) {
|
} else if (this.lastClicked > System.currentTimeMillis()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user