Solved How to add com.mojang.authlib maven

Discussion in 'Spigot Plugin Development' started by tryce05dev, Jan 26, 2020.

  1. That really doesn't help, i know how to add spigot api dependency, i just don't understand how to import the kar file while building with spigot...
  2. FrostedSnowman

    Resource Staff

    You don’t import any kind of jar. You setup your dependencies through maven. There are tutorials and videos online you can view for this. The link I provided provides you with the dependencies you need to specify in your pom.xml
    • Like Like x 1
  3. The pictures do not work. Also, you need to setup your pom.xml to be able to use spigot
  4. I know how to use pom, and i know how import spigot and such, i just don't know how to import
  5. FrostedSnowman

    Resource Staff

    you need to depend on the singular 'spigot' dependency (the artifact id)

    if you want to access such classes:

    Code (XML):
  6. You will need to find the repo for the com.mojang.authlib dependency if you want to use it through maven, or add the jar to your local repo
    Though what would you need authlib for on a server..?
    • Like Like x 1
  7. Making sure that the auth servers are up and running? :ROFLMAO::ROFLMAO:
  8. iirc the customNPC plugin uses that to get skins n stuff
    Alternative way: gameprofiles
  10. relying on 3rd party websites of questionable lifespan isnt the best solution imho
  11. Idk if im dumb, but where do i use the
    Code (Text):
    mvn install:install-file \
       -Dfile=<path-to-file> \
       -DgroupId=<group-id> \
       -DartifactId=<artifact-id> \
       -Dversion=<version> \
       -Dpackaging=<packaging> \
    Like where do i use the command

    I found out i used:
    Code (Text):
    Thanks for helping guys!
    #13 tryce05dev, Jan 27, 2020
    Last edited: Jan 27, 2020
    • Like Like x 2
  12. Wait, now the file is huge, but it works...
  13. I know this is an old thread but it still shows up on google's search results when you search for this issue. I had the same problem and I've found the solution, add this to your pom.xml:

    Code (Text):
    Note that you might need to change the version depending on the MC version
    • Useful x 5
    • Winner x 2
    • Like x 1
    • Agree x 1
    • Friendly x 1