Step by step request - Setting up the new Sponge API

I’ve looked through I believe all of the Sponge tutorials I can find - be it the docs here, threads on these forums, and videos on YouTube - yet I’m still struggling to get things to register.

HunterSharp, Negafinity, Pogo, TreBlue, Gabizou, Nielsb, and a couple of others I didn’t save to watch again for reference sadly.

Anyone able to throw down an idiot’s guide bullet-point list of what to do?

The struggle seems to be in reliably importing the Sponge API into either Eclipse or IntelliJ.

I can sometimes manage to do it, but whenever I return and try again it fails.
I’m clearly just messing something up / lucking out in turn, but as I have so many varied sources telling me what to do, I thought I’d seek one more :wink:

Hopefully a definitive, and up-to-date, one.

1 Like

Are you trying to make a plugin or work on Sponge itself?

Craft plugins :slight_smile:

Varied ideas for what I believe should be quite simple to set-up ones once I can actually get an environment set up :confused:

Make an IntelliJ Gradle project, add maven { url 'https://repo.spongepowered.org/maven/' } to the repositories, and add compile 'org.spongepowered:spongeapi:6.0.0' to the dependencies, click ‘import changes’ in the popup. Easy.

Thanks for the reply pie :slight_smile:

Whereabouts would compile go in this?

<dependency>
    <groupId>org.spongepowered</groupId>
    <artifactId>spongeapi</artifactId>
    <version>5.1.0</version>
    <scope>provided</scope>
</dependency>

Or is it within the dependencies body?
What’s the format? :slight_smile:

If you’re going the Maven way, you would Mavenly add the repository https://repo.spongepowered.org/maven (though I don’t know how), and use that exact dependency structure with whatever version in your dependencies. I prefer simple Groovy to verbose XML, though.

1 Like

Thanks

That seems to have gotten it to work.

Will find out as I assay into attempts at digital architecture :slight_smile: