diff options
author | Antony Riley <antony@cyberiantiger.org> | 2015-07-23 16:18:17 +0300 |
---|---|---|
committer | Thinkofdeath <thinkofdeath@spigotmc.org> | 2015-07-23 21:46:53 +0100 |
commit | 48c241290f235fece1ec7d08ea4421c1c67aa9a8 (patch) | |
tree | c0018ab63795bdfa2dbb5f27c18ad52689846779 /src/main | |
parent | 3e3e3430e2baf9d07bedad2dd2cc601d9bb7322b (diff) | |
download | bukkit-48c241290f235fece1ec7d08ea4421c1c67aa9a8.tar bukkit-48c241290f235fece1ec7d08ea4421c1c67aa9a8.tar.gz bukkit-48c241290f235fece1ec7d08ea4421c1c67aa9a8.tar.lz bukkit-48c241290f235fece1ec7d08ea4421c1c67aa9a8.tar.xz bukkit-48c241290f235fece1ec7d08ea4421c1c67aa9a8.zip |
SPIGOT-749: Fix NullPointerException and broken logic in Potion.fromDamage(int)
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/bukkit/potion/Potion.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/potion/Potion.java b/src/main/java/org/bukkit/potion/Potion.java index 265b0505..35428bd0 100644 --- a/src/main/java/org/bukkit/potion/Potion.java +++ b/src/main/java/org/bukkit/potion/Potion.java @@ -405,7 +405,7 @@ public class Potion { if ((damage & SPLASH_BIT) > 0) { potion = potion.splash(); } - if ((!type.equals(PotionType.INSTANT_DAMAGE) || type.equals(PotionType.FIRE_RESISTANCE)) && (damage & EXTENDED_BIT) > 0) { + if ((type == null || !type.isInstant()) && (damage & EXTENDED_BIT) > 0) { potion = potion.extend(); } return potion; |