Skip to content

[DRAFT] [FEATURE] Support for Hangar platform - #121

Draft
a6tumn wants to merge 27 commits into
modmuss50:mainfrom
a6tumn:hangar-support
Draft

[DRAFT] [FEATURE] Support for Hangar platform#121
a6tumn wants to merge 27 commits into
modmuss50:mainfrom
a6tumn:hangar-support

Conversation

@a6tumn

@a6tumn a6tumn commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Info

  • My current TODOs for this PR can be found HERE.

  • I am not very familiar with the platform and I do not make plugins, so any insight from developers who actually use Hangar would be helpful.

I've been quite busy helping out with Twilight Forest lately, so this work will probably take some time to complete. I decided to open a draft in case anybody else wanted to contribute to the platform implementation while I was still working on it. The code at the moment is just a skeleton implementation, and I'm sure there will be a lot of changes necessary to get it to a functioning state. I've also decided to mark the API as incubating since there are likely to be other plugin platforms supported in the future and common abstractions may be added.

@srnyx

srnyx commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

@a6tumn did you see my review comments for some stuff

@a6tumn

a6tumn commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

@a6tumn did you see my review comments for some stuff

I do not, although that may just be because it is a draft. If you have any bug fixes or would like to contribute, feel free to PR into my branch or DM me on Discord(user is chronictsuki).

@srnyx srnyx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

didnt know i had to actually click "submit review"... thats awkward..

Comment thread src/main/kotlin/me/modmuss50/mpp/platforms/hangar/HangarApi.kt Outdated
* List of supported platform versions, i.e. `listOf("26.1", "26.1.1")`.
*/
@get:Input
val platformVersions: ListProperty<String>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is it possible to somehow use the existing top-level Minecraft versions option for PAPER platform automatically? Seems trivial to have to specify it twice (once in top-level for other platforms and again here for Hangar).

WATERFALL also uses Minecraft versions but only up to 1.21.0. VELOCITY does NOT use Minecraft versions and has its complete own versioning (currently on 3.5.0-SNAPSHOT).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actually, maybe just switch to what Curseforge uses with CurseforgeVersions. So have a HangarVersions, idk

Hangar has https://hangar.papermc.io/api-docs#get-/api/v1/platforms/-platform-/versions to get versions for platforms

HangarApi.PluginDependency(
name = it.name.get(),
type = it.type.get(),
externalUrl = it.url.orNull ?: "$apiEndpoint/projects/${api.encodeSlug(id.get())}/",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Files are either uploaded using multi-part form data (see this gist for an example) or they have an external URL.

Basically, they can't have both. So if an external URL is provided for a file, the URL should be used. But if not, then externalUrl should NOT be set and it should upload the file directly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

oops I misread the code here... thought this was the file being published for some reason..?

anyways, i think the same logic applies here even for dependencies. if an external URL isnt provided, it shouldnt be auto-filled here. see screenshots below:

Image Image

Comment thread src/main/kotlin/me/modmuss50/mpp/platforms/hangar/HangarApi.kt Outdated
@a6tumn

a6tumn commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Hoping to get some time to work on this in the next couple of weeks. It’s still something I plan to complete.

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