Posted November 27, 20178 yr Hey, I was wondering (and couldn't find any info on it anywhere) how I could get the username of the player using the mod (thus, you, as a user of my mod) and get it into a String to use in display etc. Thanks a lot in advance
November 27, 20178 yr Author 13 minutes ago, diesieben07 said: There is no "one user". There are always potentially multiple player. Which one do you want? You can get the username of a player using EntityPlayer::getName or the display name using EntityPlayer::getDisplayName. I want the displayName of 'yourself' as in the player having the mod installed. Completely client side visual mod, so while it should work on other servers, it should only get your own name in a String. The other players don't matter to this.
November 27, 20178 yr Author 17 minutes ago, diesieben07 said: On the client you can get the player playing the game using Minecraft::player. But how do I put the Minecraft player name in a variable. I just want the name as a string. Could you show me some example code because I've never heard of your double colins.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.