Use an Api

Discussion in 'Plugin Development' started by Koobaczech, Apr 2, 2015.

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

    Koobaczech

    Hello, i downloaded an external jar.API, and i did Build Path -> Add External Archives.
    After that, i try to reference that API code and Eclipse tells me to import
    import com.x.xx.CodeEvent
    I import it and Eclipse shows no errors, but when i run my plugin i am told that it has failed to register events for my class because "com/x/xx/CodeEvent" does not exist.

    How can i fix this please? Thank you
     
  2. Offline

    nverdier

  3. Offline

    Koobaczech

    Hmm. I am told to add depend: [MyApi] in the plugin.yml, which means i need to run the API as a plugin in my plugins folder. Is there any way to migrate the API into my own jar so users don't need to download two jars?
     
  4. Offline

    nverdier

    @Koobaczech Not unless you take the API plugin and modify it.
     
  5. Offline

    Koobaczech

    So the best way to go about this is to have it be a separate jar and depend off it?
     
  6. Offline

    nverdier

  7. Moved to Plugin Development.
     
Thread Status:
Not open for further replies.

Share This Page