mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-13 02:51:37 +01:00
SPIGOT-6927: Fix default value of spawn-limits in Worlds
By: Doc <nachito94@msn.com>
This commit is contained in:
parent
314b83ffae
commit
8b46bfaaa2
@ -1501,7 +1501,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
Validate.notNull(spawnCategory, "SpawnCategory cannot be null");
|
||||
Validate.isTrue(CraftSpawnCategory.isValidForLimits(spawnCategory), "SpawnCategory." + spawnCategory + " are not supported.");
|
||||
|
||||
int limit = spawnCategoryLimit.getInt(spawnCategory);
|
||||
int limit = spawnCategoryLimit.getOrDefault(spawnCategory, -1);
|
||||
if (limit < 0) {
|
||||
limit = server.getSpawnLimit(spawnCategory);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user