mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-03 05:32:18 -07:00
Fix IllegalArgumentException for /paper mobcaps command (#7472)
This commit is contained in:
@@ -281,6 +281,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ public static int globalLimitForCategory(final ServerLevel level, final MobCategory category, final int spawnableChunkCount) {
|
+ public static int globalLimitForCategory(final ServerLevel level, final MobCategory category, final int spawnableChunkCount) {
|
||||||
|
+ if (category == MobCategory.MISC) {
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
+ final int categoryLimit = level.getWorld().getSpawnLimit(CraftSpawnCategory.toBukkit(category));
|
+ final int categoryLimit = level.getWorld().getSpawnLimit(CraftSpawnCategory.toBukkit(category));
|
||||||
+ if (categoryLimit < 1) {
|
+ if (categoryLimit < 1) {
|
||||||
+ return categoryLimit;
|
+ return categoryLimit;
|
||||||
|
Reference in New Issue
Block a user