My suggestion for sponge plugin loading!

my idea is to have an optional file made by the server owner to define what plugins it loads.

for example, i have a server with these plugins in the plugins folder:

i also have 2 different files,

one that starts it normally with all plugins (PROD SERVER)
another that has whitelist turned on, and only loads essentials and worldedit (DEV MODE SERVER)
previously i asked for something similar on bukkit, but there wasnt a way to do it


Why not making 2 server folders and use a folder junction for the shared stuff?

(I can’t follow yet)

This is all about config files,
i want server 1 to use plugins a and b
i want server 2 to use plugins a b and c
i also want server 2 to use the same config files for plugins a and b
there is currently no way to run the server without plugin c, except for deleting the c.jar file from the plugins folder

Bear in mind that the base implementation of Sponge is going to rest atop Forge, and thus the actual plugin loading itself will be handled by FML (ForgeModLoader). FML already has several different functionalities you could leverage to achieve this, but the preferred solution as of 1.8 will be JSON mod sets which basically allow you to create a set of mods to load (or rather “mod containers”, since as far as FML is concerned a Sponge plugin is just a mod container (eg. a jar file) that it has to load).

The plugin files themselves then reside in an Ivy-esque directory structure and the JSON simply specifies which to load. The location of the JSON itself is simply then supplied as a runtime argument when launching the server.

You can find more information about the JSON format here on the FML github wiki.

This flexibility will allow you to do exactly what you want, since the configuration can all be centralised, as is your local plugin “repo”, and simply specifying which plugins to load is laughably simple.


EDIT: sorry for using “simply” so much in this post, but it actually is pretty simple :smiley:

1 Like

And what about this structure? (So far ik Sponge Config files will be in “config” instead of "mods).

(note: this is also possible with windows)

so you mean the json will tell forge / sponge which files to load?
you just specify a list of plugins in a json file,
add a command line arg telling it to load the json file
and it only loads the plugins mentioned in the json file?

sounds very simple

thank you

its also about settings, worlds, etc

and, i cant do symlinks or similar.

I suddenly have a question about loading myself. How does sponge know whether or not the plugin is also required on the client side? Does it do something similar to the forge proxies, where it is defined in the plugin? I don’t see anything like that in the example plugin. Or will sponge look for certain functions with client side things and recognize that itself, possibly decreasing loadup time efficiency?

So far I know their is no client side API yet. But I am sure, servers can ping clients with message packets to see if they have the mod or not.