diff options
author | olivervscreeper <dev@olivervscreeper.co.uk> | 2015-05-25 22:11:37 +0100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2015-05-26 18:41:23 +1000 |
commit | fe015deb2ac3793aaa6cb1a084c589d90470fc57 (patch) | |
tree | 27db5a64823ff5d9de544cb3b0b400525d1dea93 | |
parent | 7d306d4e0200e8acc6e11a047235d4c8a678f71b (diff) | |
download | bukkit-fe015deb2ac3793aaa6cb1a084c589d90470fc57.tar bukkit-fe015deb2ac3793aaa6cb1a084c589d90470fc57.tar.gz bukkit-fe015deb2ac3793aaa6cb1a084c589d90470fc57.tar.lz bukkit-fe015deb2ac3793aaa6cb1a084c589d90470fc57.tar.xz bukkit-fe015deb2ac3793aaa6cb1a084c589d90470fc57.zip |
Checked for instant potions, to fix NPE in serialization. Fixes SPIGOT-749
-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 edc91754..265b0505 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 ((damage & EXTENDED_BIT) > 0) { + if ((!type.equals(PotionType.INSTANT_DAMAGE) || type.equals(PotionType.FIRE_RESISTANCE)) && (damage & EXTENDED_BIT) > 0) { potion = potion.extend(); } return potion; |