Has the DisplayName API been implemented yet?

As stated in title. Thanks

Could you give us a example of what you mean? Because I thought the display name of a player was locked on the clients side (there are work arounds)

With the Player.offer(Keys.DisplayName, text)

I could be wrong but i thought that was only going to change the chat display name. Much like how bukkits .setDisplayName() worked.

Like i said I could be wrong.

But there is a work around that has worked since api 4. And that is turning the player invincible and spawning a Entity Player with the display name you want and then keep the location of that entity player roughly the same as the main player.

Yeah, I was wondering on whether it changes the chat. For some reason it doesn’t change the chat name for me.

Listen to the MessageChannelEvent.Chat event and set the chat header.

MessageFormatter formatter = event.getFormatter();
formatter.setHeader(TextTemplate.of(Text.of("DISPLAY NAME HERE")));
1 Like

Tren Tech, thank you so much for your post. i really appreciate it a lot. was just wondering if i may ask you some other questions if you don’t mind? thanks. been thinking to make a plugin about steroids for sale as i’m living so many people searching for them and i thought that this might really be helpful.

I was wondering more so about the data being persistant rather than the actual of the changing name but thanks anyways.