Remember in JavaOp1, how there was a folder of .class files for each packet and they were dynamically loaded on startup? How was that done? I tried reading the code but it was *really* overintwined. =/
This isn't a tutorial.
Ok, it's in the right forum. I still don't like how the question was asked, but I'll give you a hint anyways:
Look in the file: javaop/src/commands/util/DocumentFlags.java
All you need to know is in there.
RemoteCommandInterface r = (RemoteCommandInterface) Class.forName("commands." + thisFile).newInstance();
So, implement an interface that the bot is aware of, and then use Class.forName(pkgName " + "." + className + ".class").newInstance(); and typecast it back to that interface? Sweet. I was just looking at the packet stuff and forgot about the commands.
PS: Sorry for insulting your coding style with the overintwined comment at the beginning. =p