use of com.archyx.aureliumskills.rewards.builder.StatRewardBuilder 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