Getting Nametag Data

Im trying to get nametag data off a entity (in this case a cow) Ive tried running a logger and tried getting a bunch of things such as Keys, Values, DataContainer… none of them seem to output what im looking for.

I think you need Keys.DISPLAY_NAME.

Yah… tried that… didn’t work either…

What did Keys.DISPLAY_NAME give you, and what were you looking for?

It didn’t actually give anything. It also didn’t show up when I outputted all the keys to the console. And serious… I’m just trying to check if the entity has a nametag applied so I can use it as a filter. (Nuke all the cows except named ones)