Discussion in 'Plugin Development' started by JjPwN1, Aug 4, 2012.
I don't know how to exactly take the source code and import it into my eclipse to edit.
I don't under stand what you're trying to do. Are you trying to import a different plugin and change it?
Just import the source code so I can see it, so sure, what you said
Make new classes and copy and paste the code in I guess. The only way to import a project is if you have the project folder, and it has to fit with your IDE.
Not true, eclipse will let you generate a project. As well as Netbeans if you know what you are doing.
I didn't mean it that way. What I meant was you can't just import a .jar into eclipse and expect a whole project, you actually need the physical project folder.
It's possible to import a jar of sources. As sources could be packaged in a jar.
Wanna give me a link? I had no idea this was possible. Wouldn't this allow random people to download my .jar and do whatever they want with it? Or is it an option? I think op is trying to edit someone else's plugin and my best guess is they wouldn't not export it with the sources packed in the jar.
Anyways to import anything in Eclipse, use the import menu under File.
So Is it possible to import a plugin into eclipse and edit it? Beacuse i saw very mutch peapole are editng the plugin bukkitgames to make more kits/abilities example endermage.
If it's not compiled, then probably yes.
This thread was from 2 months and 17 days ago, I found out the answer a while ago.
So umm, what was the answer?
This is an old thread and you can tell the answer from the convo.
Well, I am on a mac, so I don't know how Windows might do this, but...
I first get the .jar of the plugin I want to see the code of. Then, I decompile it with Archive Utility, and then find the classes and such. With those classes, I go to showmycode.com and import the .class to there. It then (obviously) shows me the code .
Answer = You can only import someone elses plugin to eclipse if they have included the source within the jar of the plugin. I dont think many people do this though, so its unlikely you will be able to.
There are other ways to do it, but are a little more complicated, take the comment above this as an example
Hmmm that's actually clever. Thanks mate.
Yeah, I worded my question wrong back when I asked it. I only wanted to see the source code. So, as I posted "A moment ago", I just use showmycode.com to look at the source if the source isn't included with the plugin in some way.
Just to confirm here, the code you are trying to edit is OPENSOURCE? and not claimed as copyright?, just might want to make sure you aren't stepping on a legal boundary here.
As I said earlier, I only wanted to see the code, not edit it. Looking at the code isn't illegal if it's copyrighted, or claimed in any way.
depending on its IPR (Intellectual Property rights), even seeing the code can be illegal.
Just a good idea to make sure you know what your legal rights are before messing with this, I've almost gotten in trouble because of not knowing this previously.
I'm sure a Bukkit plugin developer is not so private with his plugin that he/she'd put all of this protection on it to make sure no-one sees the code.
Meh, I am, Although I'm writing a partially new game all together with my one plugin, then again I don't think anyone would ever be able to get a hold of my plugin to begin with.
What turelis say is damn important! You may think "meh, I'm just looking at it, no big deal..." but that's simply not true. In fact you may never get sued cause nobody will every know, but if (you may accidentally copy code from your mind, for example) you can't know what the copyright holder will do with you. Guessing that he won't care is a dangerous game. People that don't care release under a license that tell this normally.
Other than that with a unpacker you don't decompile anything, you just extract the compiled class files out of the jar (a jar is a zip, btw) and then you use a online decompiler (even more dangerous as you share the copyrighted sources!).
//EDIT: BTW: This decompiler website you link doesn't look very serious. Can't even locate ToS (which should disallow to upload copyrighted work). So I wouldn't upload anything to it as in the end they may be code stealers (and yes, you can get sued for helping them stealing codes by uploading them).
I would just like to take this opportunity,
and thank Google,
for showing me the most unproductive thread in the history of forums.
This thread is pretty old, but since no one has given a definite answer and the necro above, heres a link, take it or leave it.
Just don't come at me with all your legal bullshit, cmon kids, you're making bukkit plugins, not games from scratch. Cry about your copyright somewhere else. I get it, people who steal code should be banned (And they are!!), but someone might just want to take a look at it and see how you've done things.
I'm also pretty sure the dev.bukkit.org team decompiles any plugins and goes through them, so why care? You're plugins are going to get decompiled anyway.
JjPwN1 You can download a java decompiler, also I use one called JDGUI, I think, and it decompiles class files, into source files ( .java ). But there's one thing about this, is that sometimes, with ItemStacks, I seem to get this thing, where it duplicates the ItemStack multiple times, or makes it in to a String. These are minor issues that can easily be resolved.
drag plugin in to jd-gui
the look at the sorce =D
While that's technically true, how the fuck are people going to know you privately looked at their source?
Separate names with a comma.