Class SkillTracker
- java.lang.Object
-
- net.eternalclient.api.listeners.skill.SkillTracker
-
public class SkillTracker extends java.lang.Object
A class for tracking skills.
-
-
Constructor Summary
Constructors Constructor Description SkillTracker()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
deregister()
Deregisters the skill tracker, removes all active skills and sets the skill tracker to null.static int
getGainedExperience(Skill skill)
Returns the gained experience for the specified skill.static int
getGainedLevels(Skill skill)
Returns the number of gained levels for the given skill.static int
getStartExperience(Skill skill)
Retrieves the starting experience of the given skill.static long
getStartLevel(Skill skill)
Returns the start level of the given skill, or 0 if the skill is not tracked.static long
getStartTime(Skill skill)
Returns the start time of the specified skill tracke, or 0 if the tracker is not found.static boolean
hasStarted(Skill skill)
Checks if the specified skill has started.void
notify(SkillExperienceEvent xp)
static void
start()
Starts the skill tracking process by updating the skill tracker with the available skills.static void
start(Skill skill)
Starts tracking a skill by updating the skill tracker with the given skill.static void
start(Skill... skills)
Starts tracking the given skills by updating the skill tracker.
-
-
-
Method Detail
-
deregister
public static void deregister()
Deregisters the skill tracker, removes all active skills and sets the skill tracker to null.
-
start
public static void start()
Starts the skill tracking process by updating the skill tracker with the available skills.
-
start
public static void start(Skill skill)
Starts tracking a skill by updating the skill tracker with the given skill.- Parameters:
skill
- the skill to be tracked
-
start
public static void start(Skill... skills)
Starts tracking the given skills by updating the skill tracker.- Parameters:
skills
- the skills to be tracked
-
getGainedExperience
public static int getGainedExperience(Skill skill)
Returns the gained experience for the specified skill.- Parameters:
skill
- the Skill for which to retrieve the gained experience- Returns:
- the gained experience for the skill, or 0 if no Tracker is found
-
getGainedLevels
public static int getGainedLevels(Skill skill)
Returns the number of gained levels for the given skill.- Parameters:
skill
- the skill to retrieve the gained levels for- Returns:
- the number of gained levels, or 0 if the tracker is null
-
hasStarted
public static boolean hasStarted(Skill skill)
Checks if the specified skill has started.- Parameters:
skill
- the skill to check- Returns:
- true if the skill has started, false otherwise
-
getStartTime
public static long getStartTime(Skill skill)
Returns the start time of the specified skill tracke, or 0 if the tracker is not found.- Parameters:
skill
- the skill for which the start time is required- Returns:
- the start time of the skill tracker, or 0 if not found
-
getStartLevel
public static long getStartLevel(Skill skill)
Returns the start level of the given skill, or 0 if the skill is not tracked.- Parameters:
skill
- the skill for which to retrieve the start level.- Returns:
- the start level of the skill, or 0 if the skill is not tracked.
-
getStartExperience
public static int getStartExperience(Skill skill)
Retrieves the starting experience of the given skill.- Parameters:
skill
- the skill to retrieve the starting experience for- Returns:
- the starting experience of the skill, or 0 if the tracker is null
-
notify
@Notify public void notify(SkillExperienceEvent xp)
-
-