Using plugins along with pixelmon which required SpongeAPI

Hi, I have a small question regarding SpongeForge and SpongeAPI, is there a way to have both so my server supports both mods and plugins?

I am trying to make a pixelmon generations server which required placeholderAPI which itself required SpongeAPI in this setup, but whenever I add SpongeForge it tries to use it instead of SpongeAPI.

So it seems you have got a little confused. While there are huge differences between spongeAPI, SpongeCommon, SpongeVanilla and SpongeForge. Sponge Forge contains SpongeAPI and SpongeCommon for all your plugin needs.

If you want to know more:

First of, head over to the sponge docs, they will tell you everything you could want to know.

Tldr:

SpongeAPI is a layer of code that most plugins solely interact with, SpongeAPI cannot run on its own (hence the API part → stands for Application Programming Interface).

This means that anyone programming a Sponge server will need to include SpongeAPI to make it able to run Sponge Plugins. So you have SpongeForge, SpongeVannila and LanternPowered all using the SpongeAPI.

SpongeCommon (I know you didnt ask for - but its nice to know) is where the majority of where the code for getting SpongeAPI to interact with Minecrafts vanilla code lives, so you will find this in both SpongeVanilla and SpongeForge however not lantern as that doesnt have the Minecraft Vanilla codebase.

SpongeForge is a extension to SpongeCommon, adding all the code to boot as a Forge mod as well as allowing SpongeAPI to get the Forge mods blocks, entities, etc.

SpongeVanilla is like SpongeForge only instead of adding all the Forge specific things, it just adds the code to boot

1 Like

Huge thank you for the detailed explanation, I was definitely confused by the three options.
I simply thought they were different builds for different applications with or without the API.

I will look into getting the right SpongeForge for 1.12.2 then.
The placeholderAPI said it needed 5.1.0 so I assumed it meant I had to get the API since it was the only one I found with a 5.1.0 version option in the drop-down of the download page.

EDIT:
To be a little more specific, I use the pixelmonPlaceholderAPI-gens-3.3.2 which itself required placeholderAPI by rojo8399. It seems to work flawlessly onto SpongeAPI 5.1.0 but as soon as I switch it onto SpongeForge, it crashes. I can upload the logs if you want to have a look after a quick breakfast break from trying to debug this crash :sweat_smile:.

EDIT 2:
I found a version that’s updated for 7.1.0, but it still seems to cause the crashing to happen when SpongeForge is present.

Thank you once again!

So normally the API version matters a lot. There is typically 2-3 numbers in the API version and for a plugin to work the first number needs to match on both your server and the plugin with the following numbers being higher or the same on the server. However the Placeholder plugin breaks that rule in the fact it works on API 5.1.x, 6.x and 7.x (not sure about 8.x yet).

If you want to send the crash report, go ahead. Ive been looking at Sponge related crash logs for over 4 years now so i know the common issues

1 Like

Here is the crash logs: Minecraftt pixelmon error - Pastebin.com
I couldn’t get it uploaded as a txt file here since the uploader only allows images apparently.
This is the log from when I tried the 7.1.0 SpongeForge jar, but I’ve switched it back on to 7.3.0 since it added a lot more errors and still didn’t fix anything.

I’m far from used to Sponge’s logs sadly haha, it’s the first time I really dive into using mods and plugins at the same time since I’m bored of the regular vanilla minecraft.
My guess so far was to look at the first ERROR message but even then it didn’t really give me much information on what the problem was.

Huge thank you for all the help!

I like your guess work, Pastebin is a preffered location to post errors with the link provided here as pastebin doesn’t break formatting and keeps for forums neet and tidy (hence why you can’t upload the log to here)

and you are correct in that you should always fix the first error first because the errors below it are typically caused by the first error (There are exceptions such as errors that say “there was a error here but im going to list it below”).

As for your error at hand, it is complaining that it cannot find a file from the placeholderAPI, this typically means one of the following.

  1. Sponge did not load correctly → normally see a error from this but I don’t
  2. PlaceholderAPI didn’t load correctly → Once again, should see a error with this
  3. PlaceholderAPI wasn’t found by Sponge → you wouldn’t get a error with this, however I can see that when a player attempts to join, it says that they are “missing PlaceholderAPI” which means it did load (and before you ask, no they don’t need to install it)
  4. You have a older version of PlaceholderAPI which didn’t contain that file that its attempting to use → Checking the history of the file in the Github, looks like it came in just before 4.1 and hasn’t been removed
  5. You loaded a mod/plugin which has the same ID as placeholderAPI but different file set → There is a simple check you can do for this, but its got a few steps to it
  6. The mod is attempting to request the file before placeholderAPI has even loaded → im not seeing the “Done!” meaning that it could be. Forge loads the mods in alphabetical order, so if you rename placeholderAPI to aplaceholderAPI, it should load before the mod causing the crash however I doubt this is happening as PixelmonPlaceholders should be aware that it needs to load after the fact.

If all else fails, the best bet is to report it to the PixelmonPlaceholders github page Issues · happyzleaf/PixelmonPlaceholders · GitHub

1 Like

Oh I see, yeah I will look into these potential fixes right away.
I was definitely not aware that the mods were loaded in alphabetical order, I thought they all had some priority of sort.
Would it be preferable if I’d place the placeholderAPI and other libraries into a coreMods folder or something like that so they are 100% assured to load first? (I don’t know if ATLauncher allows this, but I could definitely check into that if it might help in some way.)

So there is a priority sort too, its just for that priority sort to occur, the mods and plugins need to be loaded in a little bit to get that info, so the initial load is alforbetical, however some mods/plugins like to use this state of sort of loaded in, to launch code they shouldn’t (so they can have first dibs at something … which typically breaks Sponge).

As for CoreMods, I don’t belive you can use that for Sponge plugins

1 Like

Changing the order as to make the API load before the rest of the mods helped a ton. there’s a few more errors, but all seems to be from the order of the loaded mods.
The server now reaches the Done stage without a single crash.

I simply renamed the files to the exact same name but prefixed with A- , B- or C-

Huge thank you for the ton of help on this!

1 Like

Glad I could help

I will still see if I can contact the pixelmon-generations devs so they can maybe add some sort of “wait for X mod to load first” method if possible of course.

1 Like

To be honest, the error came from “PixelmonPlaceholders” and not Pixelmon, so really you should contact the devs at Issues · happyzleaf/PixelmonPlaceholders · GitHub instead

1 Like

Oh right, I always think they’re the same devs since it was on a single page to download the sidemods haha, will post them an issue right away :slight_smile: Thank you for the reminder!

1 Like