From 4ab8912b680e90a54119d04b8020ca0e32d75ba8 Mon Sep 17 00:00:00 2001 From: u9g Date: Mon, 3 Jan 2022 23:32:42 -0500 Subject: [PATCH] Add missing IAE check for PersistentDataContainer#has --- .../craftbukkit/persistence/CraftPersistentDataContainer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java index 3001bb0e3d..984e988a47 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java @@ -57,6 +57,7 @@ public class CraftPersistentDataContainer implements PersistentDataContainer { @Override public boolean has(NamespacedKey key) { + Preconditions.checkArgument(key != null, "The provided key for the custom value was null"); // Paper return this.customDataTags.get(key.toString()) != null; }