Jump to content

Getting the client which sent a packet


Recommended Posts

Hello, I'm trying to find a way to neatly get the player which sent a packet using IMessageHandler. This only allows me to retrieve the data in the message the side and the net handler. What would be the best way to see who sent the packet? Currently I am including the player's entityid in the packet. However, I really dislike this because it will break if there is more than just the default world. So to counter that I could send the world id the player is in also, and this would work. I find that method messy and overly complicated, is there a better way which I have missed?

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.

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.

  • Create New...

Important Information

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