#How to change player name in minecrtaft java 1.19.4 plugin?
1 messages · Page 1 of 1 (latest)
<@&987246652869971988> please have a look, thanks.
While you are waiting for getting help, here are some tips to improve your experience:
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.
How is it not working? Do you get an error? Can you send us the code
the code is in onjoin and i only set the playername but its not working. there is no error
I’m not going to be able to help since I don’t have Minecraft plug-in experience but I can ask for information so somebody else can help
Can you send the code?
public void onJoin(PlayerJoinEvent event){
event.getPlayer().setDisplayName("Owner" + event.getPlayer().getName());
}
Note that this name will not be displayed in game, only in chat and places defined by plugins.
yes
how to set all the names of the player? chat,tablist,world
how?
no
these might help, but you first need to understand packets:
https://wiki.vg/Protocol
https://wiki.vg/Protocol#Player_Info_Update
i dont understand
or you might try this method:
tho you probably want to change the name above the head
not working
I think its kinda hard to change it so you can try this plugin as a library:
https://www.spigotmc.org/resources/nicknamer-integrated-api.5341/
more information on how to change it yourself:
It's really annoying to change a player name, you'll need to despawn the player entity & resend it again with a new gameprofile.
https://www.spigotmc.org/threads/how-to-change-player-name.327448/