SPIGOT-4301: Fix more invalid enchants

This commit is contained in:
md_5 2018-08-26 18:48:32 +10:00
parent 5d0d83bb90
commit 2a271162af

View File

@ -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);
}