Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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.

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.

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.

  • Author

Would it be possible to send packets that tell the server IP from clients of players who have the mod and if so, how would I go about that?

Also, on the topic of getting player skins, how would I do that?

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.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.