Closed Baylem closed 9 years ago
That sounds a lot like you're having an issue with your IDE. I can't say exactly why this is happening though.
How did you set up your dependency management? Do you have Maven set up? Did you copy the .jar file into your project directory?
Oh, or actually I know what could be wrong: Could it be that copied all the .java files from this repository into your project? That would at least explain the second error you're getting. By copying the files into a different directory, you're actually placing them in a different package, which is why no "links" between the different classes work anymore.
If that's actually the case, I'd strongly advise you to read a bit about dependency management in Java. I know how you must feel, my first programming projects were quite clunky, too. In my experience, the best way to improve your code quality is to read through and understand other Java projects. I see you're working on some Bukkit plugins. You could, for example, look through the source code of a few smaller plugins, preferably by multiple authors. See how they did it and try to adapt their style :)
What is more, there are a bunch of very good general Java tutorials on the net. Maybe these could help you, too. Most important is, however, that you just keep programming and that you always try to improve further and produce better code. That's it, hope I didn't ramble on for too long!
My project -> http://gyazo.com/a89e7765a53c98023b41f9d4b85e95b9 The code -> http://gyazo.com/6c17f50520c7d71fa5355dd1bedf650a
I decompiled the code and added the library to my desktop and "TS3ApiAsync" isnt even in any of the folders
http://gyazo.com/4d82d5a31aeb5f8613fa5b47b0de666d
socketReader.registerCallback(c, callback); is also giving me a cannot resolve symbol error as well
Oh my.
You're not supposed to copy any files out of that .jar file, ever. You're also not supposed to decompile anything. What you did is you added the .jar file to the project and THEN added a newer version of the same file to the project. My reaction.
The asynchronous part of the API is not yet 100% ready. You'll have to wait until we release a new version.
Steps to using the API in your library:
import com.github.theholywaffle.teamspeak3.TS3Query;
So one last question, I know I'm really bad at this, what do I do with the Incompatible types of teamspeak.darkbot.TS3Query and com.github.theholywaffle.teamspeak3.TS3Query
You delete the file you created in the package teamspeak.darkbot.TS3Query. You should only have the .jar file as a dependency and no other files from this API in your project.
i'm trying to create a chat bot but I can't compile because in TS3Query I keep getting that error along with
SocketReader (com.github.theholywaffle.teamspeak3.TS3Query) in Socket Reader cannot be applied to (net.darkstar.darkbot.TS3Query)
Sorry I'm new to coding and if someone could help me, it would be much appreciated :+1: