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