mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-10 09:02:09 -07:00
Checked for instant potions, to fix NPE in serialization. Fixes SPIGOT-749
By: olivervscreeper <dev@olivervscreeper.co.uk>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user