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
3 changed files with 10 additions and 8 deletions

No files matched your search

@@ -26,7 +26,6 @@ public class MobLimiter extends JavaPlugin {
new ClickEvents();
new EntityEvents();
new CommandHandler();
System.out.println(configuration.getSpawnEggs());
}
@@ -95,14 +95,20 @@ public class Configuration {
}
for (String egg : plugin.getConfig().getStringList("spawn_eggs")) {
for (String eggName : plugin.getConfig().getStringList("spawn_eggs")) {
spawnEggs.add(Material.getMaterial(egg));
Material material = Material.matchMaterial(eggName);
if (material == null || !material.name().endsWith("_SPAWN_EGG")) {
plugin.getLogger().warning("Ignoring unsupported spawn egg material for this server version: " + eggName);
continue;
}
spawnEggs.add(material);
}
System.out.println(spawnEggs);
}
/**
-3
View File
@@ -178,13 +178,10 @@ limits:
spawn_eggs:
- 'ALLAY_SPAWN_EGG'
- 'ARMADILLO_SPAWN_EGG'
- 'AXOLOTL_SPAWN_EGG'
- 'BAT_SPAWN_EGG'
- 'BEE_SPAWN_EGG'
- 'BLAZE_SPAWN_EGG'
- 'BOGGED_SPAWN_EGG'
- 'BREEZE_SPAWN_EGG'
- 'CAT_SPAWN_EGG'
- 'CAMEL_SPAWN_EGG'
- 'CAVE_SPIDER_SPAWN_EGG'