Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Getting the Signed in Username

Recommended Posts

So, I've been writing a mod which requires the username of each player that uses the mod. I'm currently using Minecraft.getMinecraft().thePlayer.getGameProfile().getName(). However, this method only works if the player has loaded into a World, and I need the player username when the game launches. I know that this information is stored somewhere, because the game prints it out as a debug statement. Anyone have any insight?

Link to post
Share on other sites

Have you looked into the Session class? I believe the players username is set to a value stored in the session class, and the session class is created in the main() method.

We all stuff up sometimes... But I seem to be at the bottom of that pot.

Link to post
Share on other sites
This topic is now closed to further replies.

  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.