public class Skill
extends java.lang.Object
Constructor and Description |
---|
Skill(@NotNull java.lang.String name)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addSkillListener(@NotNull SkillListener listener)
Adds a listener to be notified of changes.
|
long |
getExperience()
Returns the skill experience.
|
int |
getFace()
Returns the skill's face.
|
int |
getLevel()
Returns the skill level.
|
@Nullable java.lang.String |
getTooltipText()
Returns a description for this spell to be used in tooltips.
|
void |
removeSkillListener(@NotNull SkillListener listener)
Removes a listener to be notified of changes.
|
void |
set(int level,
long experience)
Updates the skill attributes.
|
void |
setFace(int face)
Defines the skill's face.
|
void |
setMessage(@Nullable java.lang.String message)
Defines the skill's message.
|
@NotNull java.lang.String |
toString() |
public Skill(@NotNull @NotNull java.lang.String name)
name
- the skill namepublic void set(int level, long experience)
level
- the new skill levelexperience
- the new skill experiencepublic long getExperience()
public int getLevel()
public int getFace()
public void setFace(int face)
face
- new face indexpublic void setMessage(@Nullable @Nullable java.lang.String message)
message
- new message, may be null@NotNull public @NotNull java.lang.String toString()
toString
in class java.lang.Object
@Nullable public @Nullable java.lang.String getTooltipText()
null
if unknownpublic void addSkillListener(@NotNull @NotNull SkillListener listener)
listener
- the listener to addpublic void removeSkillListener(@NotNull @NotNull SkillListener listener)
listener
- the listener to remove