Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
d5f1ffc2e6
With the new chunk system it doesn't hurt too much to (temporarily) remove this until implemented in a safer manner
21 Zeilen
1.1 KiB
Diff
21 Zeilen
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 a03bb7341d07c39d2a8740823e4cf341b294236e..40e2a38317403d19ab53cb623aa1ba2502d6a4a7 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -2191,6 +2191,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) {
|