mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-01-10 07:47:35 +01:00
!prevent identified item hard-setting the amount of item to 1 when identified
This commit is contained in:
parent
a0839fe7f4
commit
fffd9420f4
@ -337,7 +337,11 @@ public class MMOItemsCommand implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
player.getInventory().setItemInMainHand(new IdentifiedItem(item).identify());
|
||||
final int amount = player.getInventory().getItemInMainHand().getAmount();
|
||||
ItemStack identifiedItem = new IdentifiedItem(item).identify();
|
||||
identifiedItem.setAmount(amount);
|
||||
|
||||
player.getInventory().setItemInMainHand(identifiedItem);
|
||||
sender.sendMessage(MMOItems.plugin.getPrefix() + "Successfully identified the item you are holding.");
|
||||
}
|
||||
// ==================================================================================================================================
|
||||
|
Loading…
Reference in New Issue
Block a user