use of com.archyx.aureliumskills.stats.Stat in project AureliumSkills by Archy-X.
the class StatRewardParser method parse.
@Override
public Reward parse(Map<?, ?> map) {
StatRewardBuilder builder = new StatRewardBuilder(plugin);
String statName = getString(map, "stat");
Stat stat = plugin.getStatRegistry().getStat(statName);
if (stat == null) {
throw new IllegalArgumentException("Unknown stat with name: " + statName);
}
builder.stat(stat);
builder.value(getDouble(map, "value"));
return builder.build();
}
Aggregations