Skip to content

Support multiple loaders for plugin updates via Modrinth API#288

Open
Zoriot wants to merge 1 commit into
Osiris-Team:masterfrom
Zoriot:support-velocity-updates
Open

Support multiple loaders for plugin updates via Modrinth API#288
Zoriot wants to merge 1 commit into
Osiris-Team:masterfrom
Zoriot:support-velocity-updates

Conversation

@Zoriot

@Zoriot Zoriot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Needed to make updating from modrinth work the right way.

@Osiris-Team

Osiris-Team commented Jul 14, 2026

Copy link
Copy Markdown
Owner

@Zoriot Thanks for the PR, before I go deeper into it, do you mind explaining your issue in more detail and how exactly this fixes it?

return res;
}
public SearchResult searchUpdatePlugin(MinecraftPlugin plugin, String mcVersion) { //TODO: probably don't hardcode spigot and papermc
return searchUpdate("spigot\",\"paper", plugin.getModrinthId(), mcVersion, plugin.getInstallationPath(), false);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Osiris-Team Plugin updating worked only for spigot/paper because it was hardcoded here. Now it also works for velocity and specific paper forks like Folia. It get's the loader either via server-updater.loader or if smt is specified plugins-updater.loaders where you can specify multiple ones.

@Osiris-Team Osiris-Team Jul 14, 2026

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay it seems counterintuitive to be able to provide multiple mod loaders from a user-perspective, because usually the server only has one loader, thus I'd like to keep these options away from the user and under the hood as API implementation details.

Instead it would be great to enhance the automatic detection in InstalledModLoader.java to include the detection for new mod loaders.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you want a general logic it can be complicated quite quickly, e.g you would have only supply folia for folia, Purpur > Paper > Spigot for Purpur.
Not sure if that's really feasible in that PR.

It would be nice when it correctly updates FAWE through with the paper build on paper.

What's your (simple) idea for that?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also wonder if you are open in merging that and creating an issue for moving that to internal again. With proper handling

@Osiris-Team Osiris-Team Jul 15, 2026

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Zoriot I'd like to see this implemented in this PR directly 👍. I'm not sure the implementation is that complicated. We could even remove or simplify the auto detection to instead just check what the user entered in the server-updater software section of the config, and use that to determine the compatible mod loader.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understandable. What's your proposed solution to make preferred option/handling possible?

Add a (optional) fiel to the field where we safe the data about plugins? E.g. https://modrinth.com/plugin/fastasyncworldedit/versions needs that, on a Paper (Fork) it should always install the paper version not the spigot version.

@Osiris-Team Osiris-Team Jul 16, 2026

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Zoriot Why not just install the best match automatically? For example If the server is paper we prefer paper mod/plugin builds and only fallback on spigot if needed.

plugins_updater_loaders = put(name, "plugins-updater", "loaders")
.setComments("The list of software's to update minecraft plugins.",
"If left empty, taken from server-updater.software above. I multiple values are specified it will prioritize the fist one.",
"Currently only relevant for Modrinth plugins.");

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an API endpoint that returns the available loaders that we can include here, so the user can view a valid list of available loaders to use?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is https://api.modrinth.com/v3/tag/loader but without parsing & filtering it's not shown nicely.
Probably specifying manually would make sense if we go that route

return res;
}
public SearchResult searchUpdatePlugin(MinecraftPlugin plugin, String mcVersion) { //TODO: probably don't hardcode spigot and papermc
return searchUpdate("spigot\",\"paper", plugin.getModrinthId(), mcVersion, plugin.getInstallationPath(), false);

@Osiris-Team Osiris-Team Jul 14, 2026

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay it seems counterintuitive to be able to provide multiple mod loaders from a user-perspective, because usually the server only has one loader, thus I'd like to keep these options away from the user and under the hood as API implementation details.

Instead it would be great to enhance the automatic detection in InstalledModLoader.java to include the detection for new mod loaders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants