I have the following code:
@Listener
public void onPlayerJoin(ClientConnectionEvent.Join event){
Player thisPlayer = event.getTargetEntity();
logger.info("A player named " + thisPlayer.getDisplayNameData().displayName() + " has joined");
}
I have also tried
thisPlayer.getDisplayNameData().displayName().toString()
Which does nothing different.
I want it to work like:
A player named realcake has joined
Instead, it works like:

When I checked the docs it said it returns the data as Text. I’m sure I’m missing something.