diff options
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/util/CraftNamespacedKey.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftNamespacedKey.java b/src/main/java/org/bukkit/craftbukkit/util/CraftNamespacedKey.java index 03d2392a..f1f41262 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftNamespacedKey.java +++ b/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); } |