From 59ca64d6aecc5a33425add23616ab33f334234c8 Mon Sep 17 00:00:00 2001 From: FearThe1337 Date: Wed, 17 Dec 2014 17:22:02 +0100 Subject: Fix the decoding of potions for Water. --- src/main/java/org/bukkit/potion/Potion.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/org/bukkit/potion/Potion.java b/src/main/java/org/bukkit/potion/Potion.java index 8966c906..edc91754 100644 --- a/src/main/java/org/bukkit/potion/Potion.java +++ b/src/main/java/org/bukkit/potion/Potion.java @@ -395,7 +395,7 @@ public class Potion { public static Potion fromDamage(int damage) { PotionType type = PotionType.getByDamageValue(damage & POTION_BIT); Potion potion; - if (type == null || (type == PotionType.WATER && damage != 0)) { + if (type == null || type == PotionType.WATER) { potion = new Potion(damage & NAME_BIT); } else { int level = (damage & TIER_BIT) >> TIER_SHIFT; -- cgit v1.2.3