In more recent versions of the API, your code may look look this:
String message = "You picked up this item!";
ITextComponent msg = new StringTextComponent(message);
PlayerEntity player = Minecraft.getInstance().player;
player.sendMessage(msg, player.getUUID());
It kinda seems a little worse to me to have to put in the UUID like that even you you have access to the player, but I'm sure they had a good reason to change it up.