Fix spawn egg handling on Purpur 1.19.4 #1

Merged
NotAlexNoyle merged 3 commits from agent/fix-1.19.4-spawn-eggs into master 2026-07-23 18:55:20 -04:00
NotAlexNoyle commented 2026-07-23 16:52:02 -04:00 (Migrated from github.com)

What changed

  • remove the duplicate raw System.out.println spawn-egg dumps during startup
  • validate configured spawn-egg material names before storing them
  • ignore unsupported or non-spawn-egg materials instead of inserting null values
  • remove ARMADILLO_SPAWN_EGG, BOGGED_SPAWN_EGG, and BREEZE_SPAWN_EGG from the bundled defaults because they do not exist in Minecraft/Purpur 1.19.4

Root cause

The default configuration included three materials introduced after Minecraft 1.19.4. Material.getMaterial(...) returned null for them, and the loader added those nulls to the list. The list was then printed once in Configuration.load() and again in MobLimiter.onEnable(), producing the duplicate startup log lines.

Impact

MobLimiter now starts cleanly on Purpur 1.19.4 without the duplicate material-list output or null entries. Existing custom configs containing unsupported material names are handled safely and receive a targeted warning identifying the invalid entry.

Validation

  • reviewed against the repository's declared purpur-api:1.19.4-R0.1-SNAPSHOT target
  • confirmed all three unsupported defaults are removed
  • confirmed no null material is added to spawnEggs
  • confirmed both raw console list dumps are removed

A local Gradle build could not be run in this environment because outbound repository access and the GitHub CLI are unavailable; the changes were made and reviewed through the connected GitHub API.

## What changed - remove the duplicate raw `System.out.println` spawn-egg dumps during startup - validate configured spawn-egg material names before storing them - ignore unsupported or non-spawn-egg materials instead of inserting `null` values - remove `ARMADILLO_SPAWN_EGG`, `BOGGED_SPAWN_EGG`, and `BREEZE_SPAWN_EGG` from the bundled defaults because they do not exist in Minecraft/Purpur 1.19.4 ## Root cause The default configuration included three materials introduced after Minecraft 1.19.4. `Material.getMaterial(...)` returned `null` for them, and the loader added those nulls to the list. The list was then printed once in `Configuration.load()` and again in `MobLimiter.onEnable()`, producing the duplicate startup log lines. ## Impact MobLimiter now starts cleanly on Purpur 1.19.4 without the duplicate material-list output or null entries. Existing custom configs containing unsupported material names are handled safely and receive a targeted warning identifying the invalid entry. ## Validation - reviewed against the repository's declared `purpur-api:1.19.4-R0.1-SNAPSHOT` target - confirmed all three unsupported defaults are removed - confirmed no null material is added to `spawnEggs` - confirmed both raw console list dumps are removed A local Gradle build could not be run in this environment because outbound repository access and the GitHub CLI are unavailable; the changes were made and reviewed through the connected GitHub API.
Sign in to join this conversation.