mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-21 05:44:17 +00:00
Checked for instant potions, to fix NPE in serialization. Fixes SPIGOT-749
This commit is contained in:
parent
7d306d4e02
commit
fe015deb2a
1 changed files with 1 additions and 1 deletions
|
@ -405,7 +405,7 @@ public class Potion {
|
||||||
if ((damage & SPLASH_BIT) > 0) {
|
if ((damage & SPLASH_BIT) > 0) {
|
||||||
potion = potion.splash();
|
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();
|
potion = potion.extend();
|
||||||
}
|
}
|
||||||
return potion;
|
return potion;
|
||||||
|
|
Loading…
Add table
Reference in a new issue