SPIGOT-6927: Fix default value of spawn-limits in Worlds
This commit is contained in:
parent
febaa1c6f5
commit
de95135562
@ -1501,7 +1501,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
|||||||
Validate.notNull(spawnCategory, "SpawnCategory cannot be null");
|
Validate.notNull(spawnCategory, "SpawnCategory cannot be null");
|
||||||
Validate.isTrue(CraftSpawnCategory.isValidForLimits(spawnCategory), "SpawnCategory." + spawnCategory + " are not supported.");
|
Validate.isTrue(CraftSpawnCategory.isValidForLimits(spawnCategory), "SpawnCategory." + spawnCategory + " are not supported.");
|
||||||
|
|
||||||
int limit = spawnCategoryLimit.getInt(spawnCategory);
|
int limit = spawnCategoryLimit.getOrDefault(spawnCategory, -1);
|
||||||
if (limit < 0) {
|
if (limit < 0) {
|
||||||
limit = server.getSpawnLimit(spawnCategory);
|
limit = server.getSpawnLimit(spawnCategory);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user