com.sucy.skill.dynamic.condition.BurningCondition Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proskillapi Show documentation
Show all versions of proskillapi Show documentation
A Minecraft Bukkit plugin aiming to provide an easy code API and skill editor for all server owners to
create unique and fully custom classes and skills.
package com.sucy.skill.dynamic.condition;
import com.sucy.skill.dynamic.DynamicSkill;
import mc.promcteam.engine.mccore.config.parse.DataSection;
import org.bukkit.entity.LivingEntity;
public class BurningCondition extends ConditionComponent {
private static final String BURN = "burn";
private String burn;
@Override
boolean test(LivingEntity caster, int level, LivingEntity target) {
return (caster.getFireTicks() > 0) == burn.equalsIgnoreCase("Burn");
}
@Override
public void load(DynamicSkill skill, DataSection config) {
super.load(skill, config);
burn = settings.getString(BURN);
}
@Override
public String getKey() {
return "Burning";
}
}