Compile this please!

Discussion in 'Programming' started by NotRedd, Apr 14, 2017.

  1. Hello,

    I have never compiled a plugin and have no clue how to. Please can someone compile this for me and tell me what I need to do with the dependencies (in the readme), as I know what Spigot is and I know what ProtocolLib is, however I dont understand what to do with the others.

    https://github.com/ijoeleoli/WenjaFactions
     
  2. If you're looking to compile something you'll need an IDE such as eclipse or IntelliJ,
    I'm not home at the moment or I'd offer
     
  3. I have IntelliJ, but I am unsure on how to compile it. It is 1.7.10.
     
  4. Mas

    Mas

    Maybe a Quick Google will help you.
    It is much faster to search on the internet if you need answers to simple things like this ;)

    As for the dependencies:
    - Guava, Lang3, Trove and Common Collections are already included in Spigot (pretty sure)
    - Make sure Protocollib is running on your server so it is available at runtime.
    - No need to worry about Lombok, IntelliJ will sort that out for you if you have the Lombok plugin installed.
     
  5. I am confused. Can someone please do it for me?
     
  6. No. the biggest issue I see on this forum is that people are unwilling to learn and try. If you don't want to learn to do it on your own, you will never know how to do it and learn. You will have to come back to us every time and you won't know how you can expand on it and find further opportunities for smaller successes.

    "give a man a fish and you feed him for a day; teach a man to fish and you feed him for a lifetime"

    As for how to do it, download the source from the github. Then create a new project using the downloaded code. Add your dependencies to the jar (maven is the best way to go IMO). Modify it to your needs and then export it.
    I would go into further detail but I use eclipse and not IntelliJ so I wouldn't know how to do it on IntelliJ.
     
    • Like Like x 1
    • Agree Agree x 1
  7. I understand that if I don't do it, I won't learn, but none of this really makes much sense to me. I mean, I have no clue on how to
    .
     
  8. Mas

    Mas

    Please, please, please at least have the decency to search for things before asking others here. Your answer was literally a Google search away, and was even the suggested answer.
    http://lmgtfy.com/?iie=1&q=intellij+add+dependencies+to+jar
    [​IMG]
     
  9. How am I supposed to add a JAR dependency if the is no JAR to add.
     
  10. A dependency means that it is requires it to work, from what it says in that plugins plugin.yml is that it depends on zPermissions and ProtocolLib
    You don't need to include them in the jar you're compiling, just need them on the server the plugin is being run on.
    If you want to include them you can add them to the resources folder alongside your config.yml and plugin.yml
     
  11. Mas

    Mas

    I'm struggling to understand what you are trying to do? If I'm correct you are trying to add a jar as a dependency for your plugin? What do you mean there is no jar?
     
  12. I know that I need them on the server, but I want to compile this plugin into a jar. Idc about the plugins that need to be on the server because I already have that sorted.
     
  13. I am trying to compile THIS plugin into a jar, you would know that if you read the title instead of suggesting random useless methods.
     
  14. Okay so what exactly is wrong?
    What do you need to do?
     
  15. Forgot to quote. I don't know, I just need to make these files a jar file that I can run on my server.
     
  16. Mas

    Mas

    As people have said previously, just search how to export a jar with IntelliJ. Not difficult.
     
  17. I have done, but in the tutorial it says 'select main class' which isn't there for me.
     
  18. main: me.joeleoli.hcfactions.FactionsPlugin
     
  19. There is also no build on make option.
     
  20. I get a META INF file but nothing else.