Include resources in shadow jar and fallback to default particles menu #2

Merged
NotAlexNoyle merged 1 commits from codex/fix-particles.yml-not-copied-to-jar-3akcya into master 2026-01-03 07:50:43 -05:00
2 changed files with 9 additions and 1 deletions

No files matched your search

+1
View File
@@ -62,6 +62,7 @@ tasks.withType<AbstractArchiveTask>().configureEach { // Ensure reproducible .ja
tasks.shadowJar {
exclude("org.bstats.*") // Exclude the bStats package from being shadowed.
exclude("io.github.miniplaceholders.*") // Exclude the MiniPlaceholders package from being shadowed.
from(sourceSets.main.get().resources)
isEnableRelocation = true
relocationPrefix = "${project.group}.shadow"
archiveClassifier.set("") // Use empty string instead of null.
@@ -182,7 +182,14 @@ public class ResourceUtil {
int menuVersion = particleMenuCompatibilityMap.getOrDefault(Math.min((int) CosmeticsOG.serverVersion, 14), 8);
return core.getResource("menus/particles_" + menuVersion + ".yml");
InputStream versionedMenu = core.getResource("menus/particles_" + menuVersion + ".yml");
if (versionedMenu != null) {
return versionedMenu;
}
return core.getResource("menus/particles.yml");
}