javabuild.gradleminecraftminecraft-forgespigot

Minecraft Plugin spigot import com.earth2me.essentials?


Hello I am making a plugine with spigot api and I wanted to make a possible action according to the economy of the player (economy of essentials plugin). But I don't understand how I can add in dependency the essentials plugin on the build.gradle....

I hope someone can help me, It's been 5 days I'm blocked.

class java Build.gradle

I hope to find a solution I don't know how to do...


Solution

  • As the error said, you should add import to essentials. The import should be what you added with com.earth2me.essentials, but it also should be the repository where the dependency is.

    For this, you add this into your build.gradle file:

    repositories {
        maven {
            url "https://repo.essentialsx.net/releases/"
            name "Essentials releases"
        }
    }
    

    If you want snapshot (which is not your case here), you should add this:

    repositories {
        maven {
            url "https://repo.essentialsx.net/snapshots/"
            name "Essentials releases"
        }
    }
    

    Documentation