Posted July 10, 20178 yr I was just wondering, I have an event that is a ClientConnectedToServerEvent because I couldn't find any better event that gets when the player connects to the server. I need to get the world the player joins when this event fires, how do I do this?
July 10, 20178 yr Author 4 minutes ago, diesieben07 said: 1.8.x is old, update. There is PlayerLoggedInEvent. That only runs for singleplayer as far as I can tell. I cannot get it to run when joining a multiplayer server. And you don't know what my mod is about or what it does. It has to be in 1.8.9.
July 10, 20178 yr Author Just now, diesieben07 said: The event fires on the server, not on the client. Do you need a client event? If so, why? The content of the mod does not change anything about the Minecraft version. 1.8.9 is old and outdated and no longer receives updates. It will soon be unsupported on this forum. I need to have it so that when a player joins a server it gets a player list of the world they are currently in.
July 10, 20178 yr Author Just now, diesieben07 said: On the client? Or on the server? I guess the client?
July 10, 20178 yr Author 1 minute ago, diesieben07 said: There is no reliable way to do that, the client only knows all players that are in tracking range. Could you describe what you are trying to achieve? I have a MySQL database that has a list of usernames in it. When the mod user connects to a server I want it to check through all the players and see if they are in the database.
July 10, 20178 yr Author 14 minutes ago, diesieben07 said: Where is this database hosted? What should happen when they are in the DB? Why does it matter?
July 10, 20178 yr Author 1 minute ago, diesieben07 said: Because that depends on how you implement this. If the client doesn't have access to the DB (which is likely) this must be done on the server. Ok, then how do I do it on the server?
July 10, 20178 yr Author Just now, diesieben07 said: It depends. What are you trying to do when the name is in the DB? It sets a value in the main class to true, which does something else.
July 10, 20178 yr Author The mod is made so that people can use a command to add a username to the database. When the mod user joins a server it loops through everyone on the server and then if it finds someone with a username in the database it displays some text on the screen that they are in the database for a few seconds. https://hastebin.com/gocegupiko.swift = Join class https://hastebin.com/uhuxajapec.php = Name checker https://hastebin.com/kaqocaqelo.cs = SQL Connection thing
July 10, 20178 yr Author Use the nethandle client thing. I have no idea what you mean when you say that.
July 10, 20178 yr Author Yes, I know what a class and field is. If I try NetHandlerPlayClient.playerInfoMap it throws errors because it doesn't exist.
July 10, 20178 yr Author 3 hours ago, diesieben07 said: What for? So I know what to do, so far none of our conversation on this thread has helped me
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.