Include resources in shadow jar and fallback to default particles menu #2
No files matched your search
@@ -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");
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user