Jump to content

[1.8] Getting Information About Any Player


CoinSlotGaming

Recommended Posts

I'm somewhat new to modding and I'm trying to figure out how to get any player's information such as their skin, the server they're on (if connected to one), and so on.

 

Is there a way I can do this with the 1.8 Forge API? Is there an API I could use to access this information?

 

EDIT: For those wondering why I need this information, I'm trying to make a friend list mod so me and my friends can follow each other around more easily.

Link to comment
Share on other sites

It's pretty simple to get a player when you and they are on a server together. I presume it is FAR more difficult to do so when you just want to get that information without being on the server with them. I am not sure how to go about this, but I would assume it would require accessing Minecraft account servers that hold all that information.

I am not a cat. I know my profile picture is sexy and amazing beyond anything you could imagine but my cat like features only persist in my fierce eyes. I might be a cat.

Link to comment
Share on other sites

I don't think that auth server would even have a clue as to whether the person is currently online or not, much less which server they are on.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

That is possbile, but far from easy.

You have to host a server, that holds "friends states".

Then you have to write your own packet system for your mod that sends and receives packets to/from your server.

Subscribe to different events in forge, and send friends state update to your server.

Finally, when you want to know state of your friend, send packet to your server and server sends you their state back.

 

Another option, without hosted server, can work only if you have fixed IPs.

In that case, you can send packets directly between your computers, and wait for answer packet. If it hasn't come, firend is offline.

But, that would require creating access ports in your modem, separate net handling and lots of other stuff.

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.