Jump to content

Test PlayerName


Ne0NAfr0

Recommended Posts

Hey, I am working with some code that required the players name to be the same. I would like to be able to test the code where the player name does not change from "playerX", ex" player293, then recompile and your name is player143 or whatever.

 

Just a quick question, only way I found around was to compile, run another client with updated mod pack and join a LAN server. It is a bit tedious... not really a fan. Is there any easy fix, apart from changing my code to not use the players name?

.|\| E0 |\|.      /\ Fr0

Link to comment
Share on other sites

If that is a bother you can use the use program arguments in the debug configuration to specify a user account:

 

--username=<minecraft username> --password=<minecraft password>

 

Also, just curious as to why it is the player name specifically that you are concerned with.  In general, if you want to track a player use getPersistentID() - the value will be the same for a player account even if they rename the character.

Link to comment
Share on other sites

You don't need to specify a password unless you want to use an actual account (which will require an internet connection!) - I typically just supply the --username argument so my name is consistent and I don't have to worry if I'm connected or not.

 

@OreCruncher A typical use case for wanting a consistent name is testing custom tames or some such where the owner/player is stored by UUID while offline and needs it to be the same next time they log in.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.