2
0
forked from Upstream/mmocore
This commit is contained in:
Ka0rX 2023-03-19 17:21:10 +01:00
parent 7bf8a4ee24
commit 374ac34f3c

View File

@ -35,6 +35,7 @@ import net.Indyuce.mmocore.skill.cast.ComboMap;
import net.Indyuce.mmocore.experience.ExperienceObject;
import net.Indyuce.mmocore.skilltree.tree.SkillTree;
import net.md_5.bungee.api.ChatColor;
import org.apache.commons.lang.Validate;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Particle;
@ -103,6 +104,7 @@ public class PlayerClass extends PostLoadObject implements ExperienceObject {
| SecurityException exception) {
throw new IllegalArgumentException("Could not apply playerhead texture: " + exception.getMessage());
}
Validate.isTrue(config.isConfigurationSection("skill-slots"), "You must define the skills-slots for class " + id);
for (String key : config.getConfigurationSection("skill-slots").getKeys(false)) {
SkillSlot skillSlot = new SkillSlot(config.getConfigurationSection("skill-slots." + key));
skillSlots.put(skillSlot.getSlot(), skillSlot);