From 3edc1cf4e077c5b777d0be6786e25cf6a854d9cf Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sun, 26 Aug 2018 18:48:32 +1000 Subject: [PATCH] SPIGOT-4301: Fix more invalid enchants By: md_5 --- .../java/org/bukkit/craftbukkit/util/CraftNamespacedKey.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftNamespacedKey.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftNamespacedKey.java index 03d2392a89..f1f41262db 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftNamespacedKey.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftNamespacedKey.java @@ -9,6 +9,9 @@ public final class CraftNamespacedKey { } public static NamespacedKey fromStringOrNull(String string) { + if (string == null || string.isEmpty()) { + return null; + } MinecraftKey minecraft = MinecraftKey.a(string); return (minecraft == null) ? null : fromMinecraft(minecraft); }