dev.aurelium.auraskills.api.event.skill.SkillsLoadEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of auraskills-api-bukkit Show documentation
Show all versions of auraskills-api-bukkit Show documentation
API for AuraSkills, the ultra-versatile RPG skills plugin for Minecraft
package dev.aurelium.auraskills.api.event.skill;
import dev.aurelium.auraskills.api.skill.Skill;
import dev.aurelium.auraskills.api.skill.Skills;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
import java.util.Set;
/**
* Calls when skills have finished loading from configuration files, which is usually
* on the first tick of the server. Most methods on {@link Skill} will not work until
* this event calls. Listen to this event if accessing methods on default {@link Skills}
* during plugin startup instead of in onEnable.
*/
public class SkillsLoadEvent extends Event {
private static final HandlerList handlers = new HandlerList();
private final Set skills;
public SkillsLoadEvent(Set skills) {
this.skills = skills;
}
/**
* Gets all the skills that the plugin has loaded. Some skills may be disabled by users
* through the config so use {@link Skill#isEnabled()} to check whether a skill is enabled.
*
* @return the loaded skills
*/
public Set getSkills() {
return skills;
}
@NotNull
@Override
public HandlerList getHandlers() {
return handlers;
}
public static HandlerList getHandlerList() {
return handlers;
}
}