if (!item.getTemplate().getHandler().pickupItem(player, item))
{
return false;
}
PickableAttachment attachment = item.getAttachment() instanceof PickableAttachment ? (PickableAttachment) item.getAttachment() : null;
if ((attachment != null) && !attachment.canPickUp(player))
{
return false;
}
return true;
}