Separate names with a comma.
Comments in 'Plugin Development' started by MyNameIsTriXz, Sep 1, 2016.
How can I fully modify the name of a player? There is no Player::setName(), so how can I do it then?
You can change the name when the player logs in. Just handle DataPacketReceiveEvent, and change the username (16 character limit still applies). I wrote a small script awhile back to demonstrate it. But if you want to set it any other time, it might be a bit more difficult, maybe not.
You can use reflections, but that's highly unstable, because many plugins use player names for identifying players, and changing them is very bad.
Why do you want to do it though? Why not just change display name and nametag?
If you just want to change the login name, check out NameCorrector. It might already do what you're trying to do
There are so many players who dont know what login means or how to login. When they fail at login or their nane is Steve, then I give them a temporary name, so they can still play.
What? That does NOT change the name of a player at all, all you will change is the NameTag.
Surprise, surprise. That is why people name functions with proper names.