#How to change player name in minecrtaft java 1.19.4 plugin?

1 messages · Page 1 of 1 (latest)

polar ore
#

i want to change the playername in a plugin but its not working. The plugin is for a Paper server! player.setdisplayname id not working.

trim shoreBOT
#

<@&987246652869971988> please have a look, thanks.

trim shoreBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

marsh timber
polar ore
#

the code is in onjoin and i only set the playername but its not working. there is no error

marsh timber
polar ore
#

public void onJoin(PlayerJoinEvent event){

    event.getPlayer().setDisplayName("Owner" + event.getPlayer().getName());
}
polar ore
#

its a test

oak imp
#

Note that this name will not be displayed in game, only in chat and places defined by plugins.

polar ore
oak imp
#

not sure if its even possible to change the name in the world

#

probably via packets

polar ore
#

how?

oak imp
#

idk would need to look it up

#

you know how packets work?

polar ore
#

no

oak imp
polar ore
#

i dont understand

oak imp
#

or you might try this method:
tho you probably want to change the name above the head

polar ore
#

not working

oak imp