Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any idea how to get the joined hostname at the point of the hooks? #3

Open
mjsir911 opened this issue Feb 23, 2025 · 0 comments
Open

Comments

@mjsir911
Copy link

Hi,

First of all: fantastic plugin, is pretty much entirely what I'm looking for in a sea of "this is a bad idea, don't do this".

Although I would like a bit of help: I'de like to access the hostname the player is joining by. This has been implemented in craftbukkit & bukkit here:

Obviously with what you're doing interfacing with (mostly? all?) vanilla minecraft server hooks it doesn't have support for hostnames on the connection object or passing around them at all really.

I was wondering if you had any leads? By the time PlayerLoginEvent is happening it's too late. The hostname is being recieved within handleIntention(PacketHandshakingInSetProtocol.., which is happening roughly before the LoginListener stuff that you hook in to, & LoginListener.connection.hostname is set within bukkit but there's no way to access it from your hasJoinedServer.

Any ideas are appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant