mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-03-29 16:16:51 +01:00
fix duplication bug from max use consumable
This commit is contained in:
parent
00bb2e12d3
commit
8867651abc
@ -278,7 +278,11 @@ public class Consumable extends UseItem {
|
||||
}
|
||||
}
|
||||
|
||||
player.getInventory().setItemInMainHand(usedItem);
|
||||
if(player.getInventory().getItemInMainHand().equals(item)) {
|
||||
player.getInventory().setItemInMainHand(usedItem);
|
||||
} else if(player.getInventory().getItemInOffHand().equals(item)) {
|
||||
player.getInventory().setItemInOffHand(usedItem);
|
||||
}
|
||||
|
||||
if(item.getAmount() > 1) {
|
||||
item.setAmount(item.getAmount() - 1);
|
||||
|
Loading…
Reference in New Issue
Block a user