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.