Search in sources :

Example 16 with Stat

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();
}
Also used : StatRewardBuilder(com.archyx.aureliumskills.rewards.builder.StatRewardBuilder) Stat(com.archyx.aureliumskills.stats.Stat)

Aggregations

Stat (com.archyx.aureliumskills.stats.Stat)16 PlayerData (com.archyx.aureliumskills.data.PlayerData)7 Skill (com.archyx.aureliumskills.skills.Skill)5 ItemStack (org.bukkit.inventory.ItemStack)5 ArrayList (java.util.ArrayList)4 StatModifier (com.archyx.aureliumskills.modifier.StatModifier)3 BukkitRunnable (org.bukkit.scheduler.BukkitRunnable)3 AbstractAbility (com.archyx.aureliumskills.ability.AbstractAbility)2 AbilityData (com.archyx.aureliumskills.data.AbilityData)2 PlayerDataLoadEvent (com.archyx.aureliumskills.data.PlayerDataLoadEvent)2 KeyIntPair (com.archyx.aureliumskills.util.misc.KeyIntPair)2 NBTCompound (de.tr7zw.changeme.nbtapi.NBTCompound)2 NBTItem (de.tr7zw.changeme.nbtapi.NBTItem)2 IOException (java.io.IOException)2 List (java.util.List)2 Player (org.bukkit.entity.Player)2 ItemMeta (org.bukkit.inventory.meta.ItemMeta)2 AureliumSkills (com.archyx.aureliumskills.AureliumSkills)1 CommandMessage (com.archyx.aureliumskills.lang.CommandMessage)1 Lang (com.archyx.aureliumskills.lang.Lang)1