Skip to content

Commit

Permalink
EffectDTO fix null error
Browse files Browse the repository at this point in the history
  • Loading branch information
Firestone82 committed Apr 30, 2024
1 parent d8327bc commit 5940f34
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ protected void validateInner(@Nullable ValidationConfig validationConfig) {
"Strength must not be null for this type of effect."));
} else if ((getType() == EffectType.HEAL || getType() == EffectType.REGENERATION) && strength == -1) {
// this is okay and im too tired to think
} else if (getType().isResistance && strength == -1) {
} else if (getType().isResistance && strength != null && strength == -1) {
// resistances can have strength -1 too
} else if (getType().hasStrength && strength < 1) {
errors.add(new ValidationError("Effect", "strength", getStrength(),
Expand Down

0 comments on commit 5940f34

Please sign in to comment.