mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2025-02-10 12:41:23 +01:00
Fixed an error message with non existing skill modifiers
This commit is contained in:
parent
532fe31833
commit
b379597afb
@ -10,10 +10,7 @@ import net.Indyuce.mmocore.api.util.math.formula.LinearValue;
|
|||||||
import org.apache.commons.lang.Validate;
|
import org.apache.commons.lang.Validate;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class ClassSkill implements CooldownObject {
|
public class ClassSkill implements CooldownObject {
|
||||||
private final RegisteredSkill skill;
|
private final RegisteredSkill skill;
|
||||||
@ -74,7 +71,7 @@ public class ClassSkill implements CooldownObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public double getModifier(String modifier, int level) {
|
public double getModifier(String modifier, int level) {
|
||||||
return modifiers.get(modifier).calculate(level);
|
return Objects.requireNonNull(modifiers.get(modifier), "Could not find modifier '" + modifier + "'").calculate(level);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<String> calculateLore(PlayerData data) {
|
public List<String> calculateLore(PlayerData data) {
|
||||||
|
Loading…
Reference in New Issue
Block a user