Solved How to see the source code of a plugin

Discussion in 'Plugin Development' started by JjPwN1, Aug 4, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    JjPwN1

    I don't know how to exactly take the source code and import it into my eclipse to edit.
     
  2. Offline

    TheSmallBones

    I don't under stand what you're trying to do. Are you trying to import a different plugin and change it?
     
  3. Offline

    JjPwN1

    TheSmallBones
    Just import the source code so I can see it, so sure, what you said
     
  4. Offline

    TheSmallBones

    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.
     
  5. Offline

    Sagacious_Zed Bukkit Docs

    Not true, eclipse will let you generate a project. As well as Netbeans if you know what you are doing.
     
  6. Offline

    TheSmallBones

    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.
     
  7. Offline

    Sagacious_Zed Bukkit Docs

    It's possible to import a jar of sources. As sources could be packaged in a jar.
     
  8. Offline

    TheSmallBones

    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.
     
  9. Offline

    Sagacious_Zed Bukkit Docs

    Anyways to import anything in Eclipse, use the import menu under File.
     
  10. Offline

    Egordm

    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.
     
  11. Offline

    Woobie

    If it's not compiled, then probably yes.
     
  12. Offline

    JjPwN1

    This thread was from 2 months and 17 days ago, I found out the answer a while ago.
     
  13. Offline

    Lelo

    So umm, what was the answer? :p
     
  14. Offline

    LaxWasHere

    ...
    This is an old thread and you can tell the answer from the convo.
     
  15. Offline

    JjPwN1

    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 :).
     
  16. Offline

    the_merciless

    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
     
  17. Offline

    Lelo

    Hmmm that's actually clever. Thanks mate.
     
  18. Offline

    JjPwN1

    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.
     
  19. Offline

    turelis

    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.
     
  20. Offline

    JjPwN1

    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.
     
  21. Offline

    turelis

    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.
     
  22. Offline

    JjPwN1

    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.
     
  23. Offline

    turelis

    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.
     
  24. 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).
     
  25. Offline

    Mre30

    I would just like to take this opportunity,

    and thank Google,

    for showing me the most unproductive thread in the history of forums.
     
    Faith likes this.
  26. Offline

    CreeperShift

    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.

    http://java.decompiler.free.fr/

    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.
     
  27. Offline

    kreashenz

    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.
     
  28. Offline

    TheUpdater

    download jd-gui
    download plugin
    drag plugin in to jd-gui
    the look at the sorce =D
     
    stefydubstep likes this.
  29. Offline

    PandazNWafflez

    While that's technically true, how the fuck are people going to know you privately looked at their source?
     
    CreeperShift likes this.
Thread Status:
Not open for further replies.

Share This Page