From 8b46bfaaa283ab96c191b1f18ce3be8882512a7a Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Mon, 7 Feb 2022 18:03:56 -0300 Subject: [PATCH] SPIGOT-6927: Fix default value of spawn-limits in Worlds By: Doc --- .../src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 902b92cc3f..dbdd93e978 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -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); }