
BillehBawb
Members-
Posts
23 -
Joined
-
Last visited
Everything posted by BillehBawb
-
[1.8.9] ClientConnectedToServerEvent world
BillehBawb replied to BillehBawb's topic in Modder Support
So I know what to do, so far none of our conversation on this thread has helped me -
[1.8.9] ClientConnectedToServerEvent world
BillehBawb replied to BillehBawb's topic in Modder Support
Can I have a code example? -
[1.8.9] ClientConnectedToServerEvent world
BillehBawb replied to BillehBawb's topic in Modder Support
Yes, I know what a class and field is. If I try NetHandlerPlayClient.playerInfoMap it throws errors because it doesn't exist. -
[1.8.9] ClientConnectedToServerEvent world
BillehBawb replied to BillehBawb's topic in Modder Support
Use the nethandle client thing. I have no idea what you mean when you say that. -
[1.8.9] ClientConnectedToServerEvent world
BillehBawb replied to BillehBawb's topic in Modder Support
How do I use that? -
[1.8.9] ClientConnectedToServerEvent world
BillehBawb replied to BillehBawb's topic in Modder Support
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 -
[1.8.9] ClientConnectedToServerEvent world
BillehBawb replied to BillehBawb's topic in Modder Support
It sets a value in the main class to true, which does something else. -
[1.8.9] ClientConnectedToServerEvent world
BillehBawb replied to BillehBawb's topic in Modder Support
Ok, then how do I do it on the server? -
[1.8.9] ClientConnectedToServerEvent world
BillehBawb replied to BillehBawb's topic in Modder Support
Why does it matter? -
[1.8.9] ClientConnectedToServerEvent world
BillehBawb replied to BillehBawb's topic in Modder Support
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. -
[1.8.9] ClientConnectedToServerEvent world
BillehBawb replied to BillehBawb's topic in Modder Support
I guess the client? -
[1.8.9] ClientConnectedToServerEvent world
BillehBawb replied to BillehBawb's topic in Modder Support
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. -
[1.8.9] ClientConnectedToServerEvent world
BillehBawb replied to BillehBawb's topic in Modder Support
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. -
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?
-
Bump, I still cant get the connector to compile with the jar
-
How do I use it?
-
Just a reminder: The SQL stuff DOES work while I am testing it in eclipse. It is only after I export it to a jar and try and run it with my normal client it gives me the error. I also have added the MySQL thing to my dependencies, to no avail. Neither of these have been solved yet. I am going to sleep now, so don't expect replies for a while if you post here. Thanks!
-
I am moving over to forge from spigot for a while to see how it works differently and stuff. I am trying to make a mod that connects to a MySQL database and adds a name when a command is run, then when someone with that username in the database joins a server you are in or you join a server they are in a little thingy appears in the corner for a few seconds to let you know they are in your server. Its mainly made to add hackers to the database then let you know when you join a server with them so you can leave I just have a few questions. When I run the project in eclipse, and do /hacker add <username> which adds the username to the database it works just fine. But then when I build the mod and open it in actual Minecraft, and try and add a username to the database it gives me this error. [15:48:13] [Client thread/INFO]: [com.billehbawb.hackerdetect.Main:getConnection:73]: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver I have looked up a lot about this error and I have come to the conclusion that I have to add the sql connector jar to my classpath in my jvm arguments, but I don't know how. Help on that would be appreciated. My next problem is that something simply doesn't work. https://hastebin.com/axuyunucah.swift That is my PlayerJoin class. What it is SUPPOSED to do is get when a player joins, check if they are in the database and then if they are add them to inNotify for 10 seconds. Now I know there are 2 things you are thinking right now. First off, what does inNotify do? We will get to that in a second. Also, I call Main.getUsernames(). So while we are on it, here is all my SQL stuff in my main class. https://hastebin.com/ilavoluwep.cs Ok, and then this is my render image thingy. https://hastebin.com/digecijuyo.scala Basically it checks if the person is in inNotify and then displays the message to them. I have tested the message without checking if they are innotify, and it works but it displays all the time so having it check if the player is in the list is the best I could think of. Anyways I know this may have been not very descriptive, and a lot of people are about to hate me but I would really prefer if instead of giving me a vauge answer I would much rather have actual code I can look at. Thanks.
-
[1.8.9] How to render image in top left corner of screen?
BillehBawb replied to BillehBawb's topic in Modder Support
Gui.drawString does not appear for me -
[1.8.9] How to render image in top left corner of screen?
BillehBawb replied to BillehBawb's topic in Modder Support
Thanks both of you, after some experimenting I got it to show up. I just have a few more small questions... first off, is there a simple way to just display text? I want to display text over my image and it changed depending on arguments and the situation. -
[1.8.9] How to render image in top left corner of screen?
BillehBawb replied to BillehBawb's topic in Modder Support
Can I have some example code for a 256 x 256 square? I find it easier to learn by looking at code and then going through it and understanding it, plus it gives me something I can reference in the future -
[1.8.9] How to render image in top left corner of screen?
BillehBawb replied to BillehBawb's topic in Modder Support
@Alpvax Thank you for the suggestions! I have updated my project. And this is my new code. https://hastebin.com/palikucuho.scala However, I still have the same issue.