diff options
Diffstat (limited to 'src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java index f85650f9..5a8b77a0 100644 --- a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java +++ b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java @@ -68,9 +68,12 @@ public class CraftPotionUtil { } public static PotionData toBukkit(String type) { - if (type.startsWith("minecraft:")) { - type = type.substring(10); - } + if (type == null) { + return new PotionData(PotionType.UNCRAFTABLE, false, false); + } + if (type.startsWith("minecraft:")) { + type = type.substring(10); + } PotionType potionType = null; potionType = extendable.inverse().get(type); if (potionType != null) { |