From aa02c00db89db5407460e3a72ea5bfc5d23623d9 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Fri, 15 Oct 2021 10:04:22 +0100 Subject: [PATCH] Fixed Potionmaster NPE --- .../com/willfp/ecoskills/effects/effects/EffectPotionmaster.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/effects/effects/EffectPotionmaster.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/effects/effects/EffectPotionmaster.kt index d66df9d..823ad95 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/effects/effects/EffectPotionmaster.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/effects/effects/EffectPotionmaster.kt @@ -136,7 +136,7 @@ class EffectPotionmaster : Effect( effects[PotionEffectType.SLOW] = 4 effects[PotionEffectType.DAMAGE_RESISTANCE] = 2 } else { - effects[data.type.effectType!!] = if (data.type.isUpgradeable) 2 else 1 + effects[data.type.effectType ?: return] = if (data.type.isUpgradeable) 2 else 1 } for (entity in entities) {