Slimefun / Slimefun4

Slimefun 4 - A unique Spigot/Paper plugin that looks and feels like a modpack. We've been giving you backpacks, jetpacks, reactors and much more since 2013.
GNU General Public License v3.0
961 stars 546 forks source link

Fix contributor head being pullable #4072

Closed WalshyDev closed 8 months ago

WalshyDev commented 8 months ago

Description

In GitHubTask we're doing Optional<String> skin = Optional.of(future.get().toString()); where future.get() returns PlayerSkin. However, PlayerSkin does not have a toString() function and therefore this was resulting in the normal Object#toString meaning skin was like io.github.thebusybiscuit.slimefun4.libraries.dough.skins.PlayerSkin@abcdef123 instead of the base64 texture.

Proposed changes

This PR updates dough and a small change in our contributor code to fix #4071

Unfortunately, this change cannot be easily unit-tested as the whole GitHubTask is private and changing that wouldn't make sense. We could run the Runnable but we shouldn't, it'll do a bunch of network requests and generally just be bad practice to test a single function.

Dough PR for this change: https://github.com/baked-libs/dough/pull/240

Related Issues (if applicable)

Fixes #4071

Checklist

Merge checklist

github-actions[bot] commented 8 months ago

Your Pull Request was automatically labelled as: "✨ Fix" Thank you for contributing to this project! ❤️

WalshyDev commented 8 months ago

Server owners hitting this should bust the cache after updating Slimefun. File is located at: plugins/Slimefun/cache/github/skins.yml

Upon testing we saw only a few heads loading per start, not sure why or what's happening there. Once the cache is filled up though, it'll be fine. Not gonna investigate that for now

sonarcloud[bot] commented 8 months ago

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

github-actions[bot] commented 8 months ago

Slimefun preview build

A Slimefun preview build is available for testing! Commit: be74ed09

https://preview-builds.walshy.dev/download/Slimefun/4072/be74ed09

Note: This is not a supported build and is only here for the purposes of testing. Do not run this on a live server and do not report bugs anywhere but this PR!

J3fftw1 commented 8 months ago

Why do we need authlib as a dependency

WalshyDev commented 8 months ago

Why do we need authlib as a dependency

Java compilation fails otherwise. Since we now do getProfile and get the CustomGameProfile which inherits from GameProfile. it should have been picking it up from dough, I'm still not 100% sure why it didn't but alas. It's a provided dependency so it doesn't add anything extra.