Fix spawn egg handling on Purpur 1.19.4 #1
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);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in new issue
Block a user