mirror of
https://github.com/TotalFreedomMC/TF-Marriage.git
synced 2024-12-28 02:54:21 +00:00
Update CommandGift.java
Cancel if partner's inventory is full when gifting
This commit is contained in:
parent
859454cb57
commit
51f7b69c9a
1 changed files with 5 additions and 0 deletions
|
@ -36,6 +36,11 @@ public class CommandGift extends Command {
|
|||
reply(Message.NO_ITEM);
|
||||
return;
|
||||
}
|
||||
|
||||
if(partner.getInventory().firstEmpty() == -1) {
|
||||
reply(Message.PARTNER_INVENTORY_FULL);
|
||||
return;
|
||||
}
|
||||
|
||||
partner.getInventory().addItem(item.clone());
|
||||
player.setItemInHand(null);
|
||||
|
|
Loading…
Reference in a new issue