mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2025-02-21 14:31:22 +01:00
Creation of skillSlot class
This commit is contained in:
parent
25e3b478d5
commit
4dce534d74
@ -0,0 +1,24 @@
|
|||||||
|
package net.Indyuce.mmocore.api.player.profess.skillslot;
|
||||||
|
|
||||||
|
import io.lumine.mythic.lib.api.math.BooleanExpressionParser;
|
||||||
|
import net.Indyuce.mmocore.skill.ClassSkill;
|
||||||
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
|
|
||||||
|
public class SkillSlot {
|
||||||
|
private final int slot;
|
||||||
|
private final String expression;
|
||||||
|
|
||||||
|
public SkillSlot(int slot, String expression) {
|
||||||
|
this.slot = slot;
|
||||||
|
this.expression = expression;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SkillSlot(ConfigurationSection section) {
|
||||||
|
this.slot = Integer.parseInt(section.getName());
|
||||||
|
this.expression = section.getString("expression");
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean canBePlaced(ClassSkill classSkill) {
|
||||||
|
return new BooleanExpressionParser(expression).parse(classSkill.getSkill().getCategories());
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user