Ensure the plugin bundles built-in menu resources so the menus folder is not empty at runtime when creating the shaded jar.
Provide a safe fallback for particle menus when a versioned menu resource is not present in the JAR.
Prevent runtime failures caused by missing menu resources when importing default menus into the database.
Description
Added a fallback in ResourceUtil.getMostCompatibleParticlesMenu() to return core.getResource("menus/particles.yml") when the versioned resource is missing.
Updated build.gradle.kts to include main resources in the shadow JAR by adding from(sourceSets.main.get().resources) to the tasks.shadowJar configuration.
These changes ensure both that the code tries the default particles.yml and that shipped menus/*.yml files are packaged into the final shaded artifact.
Testing
Ran ./gradlew processResources, which completed successfully and build/resources/main/menus contained particles.yml and purchase_menu.yml.
Attempted ./gradlew shadowJar, which failed earlier due to external dependency resolution errors (HTTP 403 from remote repositories) unrelated to resource packaging.
No automated shadow jar build was executed after adding from(sourceSets.main.get().resources) in this rollout due to the external dependency resolution issue.
### Motivation
- Ensure the plugin bundles built-in menu resources so the `menus` folder is not empty at runtime when creating the shaded jar.
- Provide a safe fallback for particle menus when a versioned menu resource is not present in the JAR.
- Prevent runtime failures caused by missing menu resources when importing default menus into the database.
### Description
- Added a fallback in `ResourceUtil.getMostCompatibleParticlesMenu()` to return `core.getResource("menus/particles.yml")` when the versioned resource is missing.
- Updated `build.gradle.kts` to include main resources in the shadow JAR by adding `from(sourceSets.main.get().resources)` to the `tasks.shadowJar` configuration.
- These changes ensure both that the code tries the default `particles.yml` and that shipped `menus/*.yml` files are packaged into the final shaded artifact.
### Testing
- Ran `./gradlew processResources`, which completed successfully and `build/resources/main/menus` contained `particles.yml` and `purchase_menu.yml`.
- Attempted `./gradlew shadowJar`, which failed earlier due to external dependency resolution errors (HTTP 403 from remote repositories) unrelated to resource packaging.
- No automated shadow jar build was executed after adding `from(sourceSets.main.get().resources)` in this rollout due to the external dependency resolution issue.
------
[Codex Task](https://chatgpt.com/codex/tasks/task_e_69590ba2c004832fa163bd963c6813a7)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Motivation
menusfolder is not empty at runtime when creating the shaded jar.Description
ResourceUtil.getMostCompatibleParticlesMenu()to returncore.getResource("menus/particles.yml")when the versioned resource is missing.build.gradle.ktsto include main resources in the shadow JAR by addingfrom(sourceSets.main.get().resources)to thetasks.shadowJarconfiguration.particles.ymland that shippedmenus/*.ymlfiles are packaged into the final shaded artifact.Testing
./gradlew processResources, which completed successfully andbuild/resources/main/menuscontainedparticles.ymlandpurchase_menu.yml../gradlew shadowJar, which failed earlier due to external dependency resolution errors (HTTP 403 from remote repositories) unrelated to resource packaging.from(sourceSets.main.get().resources)in this rollout due to the external dependency resolution issue.Codex Task