mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-03 01:10:37 +01:00
e6f8284125
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: d43a1e72 SPIGOT-2450: Improve scoreboard criteria API, add missing DisplaySlots 9d6e4847 SPIGOT-7122: New Allay Methods from 1.19.1 CraftBukkit Changes: c379a6b4e SPIGOT-2450: Improve scoreboard criteria API, add missing DisplaySlots 051fcced1 SPIGOT-7122: New Allay Methods from 1.19.1
21 lines
1.1 KiB
Diff
21 lines
1.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
|
|
Date: Sat, 12 Feb 2022 12:40:50 -0700
|
|
Subject: [PATCH] Add missing Validate calls to CraftServer#getSpawnLimit
|
|
|
|
Copies appropriate checks from CraftWorld#getSpawnLimit
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
index 17d4afb04a0a767283fcccb0cc00ab0043b49e22..8669584f7e89e89145631f86bf123b8a82c38e97 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -2164,6 +2164,8 @@ public final class CraftServer implements Server {
|
|
@Override
|
|
public int getSpawnLimit(SpawnCategory spawnCategory) {
|
|
// Paper start
|
|
+ Validate.notNull(spawnCategory, "SpawnCategory cannot be null");
|
|
+ Validate.isTrue(CraftSpawnCategory.isValidForLimits(spawnCategory), "SpawnCategory." + spawnCategory + " does not have a spawn limit.");
|
|
return this.getSpawnLimitUnsafe(spawnCategory);
|
|
}
|
|
public int getSpawnLimitUnsafe(final SpawnCategory spawnCategory) {
|