Class PlayerClass
-
Constructor Summary
ConstructorsConstructorDescriptionPlayerClass
(PlayerClass _data) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptiongetData()
Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the generic data for the class.double
getExp()
Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the experience of the class towards the next level.double
Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the amount of health this class provides the playerint
getLevel()
Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the current level of the class.double
getMana()
Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the amount of mana this class provides the playerDeprecated, for removal: This API element is subject to removal in a future version.Retrieves the data of the player owning this class.int
Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the number of skill points the class has currently available.Deprecated, for removal: This API element is subject to removal in a future version.int
Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the required experience to level up to the next level.double
Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the total amount of experience the player has accumulated for this class since professing as it.void
Deprecated, for removal: This API element is subject to removal in a future version.Gives experience to the class under the context of the experience source.void
Deprecated, for removal: This API element is subject to removal in a future version.Gives experience to the class under the context of the experience source.void
giveLevels
(int amount) Deprecated, for removal: This API element is subject to removal in a future version.Gives levels to the player's class, leveling it up.void
givePoints
(int amount) Deprecated, for removal: This API element is subject to removal in a future version.Gives skill points to be used for the class.void
givePoints
(int amount, PointSource source) Deprecated, for removal: This API element is subject to removal in a future version.Gives skill points to be used for the class.boolean
Deprecated, for removal: This API element is subject to removal in a future version.Checks whether the class has reached the max level.void
loseExp
(double percent) Deprecated, for removal: This API element is subject to removal in a future version.Causes the player to lose experience This will launch aPlayerExperienceLostEvent
event before taking the experience.void
loseExp
(double amount, boolean percent, boolean changeLevel) Deprecated, for removal: This API element is subject to removal in a future version.Causes the player to lose experience This will launch aPlayerExperienceLostEvent
event before taking the experience.void
loseLevels
(int amount) Deprecated, for removal: This API element is subject to removal in a future version.void
setExp
(double exp) Deprecated, for removal: This API element is subject to removal in a future version.Sets the current experience for the playervoid
setLevel
(int level) Deprecated, for removal: This API element is subject to removal in a future version.Sets the level for the classvoid
setPoints
(int amount) Deprecated, for removal: This API element is subject to removal in a future version.Sets the amount of points the player's class has without launching an event.void
usePoints
(int amount) Deprecated, for removal: This API element is subject to removal in a future version.Uses points from the player for skill upgrades.
-
Constructor Details
-
PlayerClass
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
getRealClass
Deprecated, for removal: This API element is subject to removal in a future version. -
getPlayerData
Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the data of the player owning this class.
- Returns:
- data of owning player
-
getData
Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the generic data for the class.
- Returns:
- generic data for the class
-
getExp
public double getExp()Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the experience of the class towards the next level.
This should not ever be higher than the required experience.
- Returns:
- the current experience of the class towards the next level
-
setExp
public void setExp(double exp) Deprecated, for removal: This API element is subject to removal in a future version.Sets the current experience for the player- Parameters:
exp
- experience to set to
-
getRequiredExp
public int getRequiredExp()Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the required experience to level up to the next level.
- Returns:
- the current required experience
-
getTotalExp
public double getTotalExp()Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the total amount of experience the player has accumulated for this class since professing as it.
- Returns:
- total accumulated experience for the class
-
getLevel
public int getLevel()Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the current level of the class.
This should never be less than 1 or greater than the maximum level.
- Returns:
- current level of the class
-
setLevel
public void setLevel(int level) Deprecated, for removal: This API element is subject to removal in a future version.Sets the level for the class- Parameters:
level
- level to set to
-
getPoints
public int getPoints()Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the number of skill points the class has currently available.
This should never be a negative number.
- Returns:
- number of available skill points
-
setPoints
public void setPoints(int amount) Deprecated, for removal: This API element is subject to removal in a future version.Sets the amount of points the player's class has without launching an event.
This cannot be less than 0.
This is used primarily for initialization. You should generally use givePoints(int, PointSource) instead.
- Parameters:
amount
- number of points to set it to
-
isLevelMaxed
public boolean isLevelMaxed()Deprecated, for removal: This API element is subject to removal in a future version.Checks whether the class has reached the max level.
- Returns:
- true if max level, false otherwise
-
getHealth
public double getHealth()Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the amount of health this class provides the player- Returns:
- health provided for the player by this class
-
getMana
public double getMana()Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the amount of mana this class provides the player- Returns:
- mana provided for the player by this class
-
givePoints
public void givePoints(int amount) Deprecated, for removal: This API element is subject to removal in a future version.Gives skill points to be used for the class.
The number of points cannot be negative.
This calls an event that can be cancelled or have the number of points modified.
This treats the points as coming from the source "SPECIAL".
- Parameters:
amount
- amount of points to give- Throws:
IllegalArgumentException
- if the points are less than 1
-
givePoints
Deprecated, for removal: This API element is subject to removal in a future version.Gives skill points to be used for the class.
The number of points cannot be negative.
This calls an event that can be cancelled or have the number of points modified.
- Parameters:
amount
- amount of points to givesource
- source of the points- Throws:
IllegalArgumentException
- if the points are less than 1
-
usePoints
public void usePoints(int amount) Deprecated, for removal: This API element is subject to removal in a future version.Uses points from the player for skill upgrades.- Parameters:
amount
- amount of points to use
-
giveExp
Deprecated, for removal: This API element is subject to removal in a future version.Gives experience to the class under the context of the experience source.
This will also check for leveling up after the experience is added.
If the class does not normally receive experience from the source, it will still launch an experience event, just it will start off as cancelled in case it should still be given in select circumstances.
- Parameters:
amount
- amount of experience to givesource
- type of the source of the experience
-
giveExp
Deprecated, for removal: This API element is subject to removal in a future version.Gives experience to the class under the context of the experience source.
This will also check for leveling up after the experience is added.
If the class does not normally receive experience from the source, or the player is already max level, it will still launch an experience event, just it will start off as cancelled in case it should still be given in select circumstances.
- Parameters:
amount
- amount of experience to givesource
- type of the source of the experienceshowMessage
- whether to show the configured message if enabled
-
loseExp
public void loseExp(double amount, boolean percent, boolean changeLevel) Deprecated, for removal: This API element is subject to removal in a future version.Causes the player to lose experience This will launch aPlayerExperienceLostEvent
event before taking the experience.- Parameters:
amount
- percent of experience to losepercent
- whether to take the amount as a percentagechangeLevel
- whether to lower the level if the exp lost exceeds the current exp, or to cap at 0 exp and keep the current level
-
loseExp
public void loseExp(double percent) Deprecated, for removal: This API element is subject to removal in a future version.Causes the player to lose experience This will launch aPlayerExperienceLostEvent
event before taking the experience.- Parameters:
percent
- percent of experience to lose
-
giveLevels
public void giveLevels(int amount) Deprecated, for removal: This API element is subject to removal in a future version.Gives levels to the player's class, leveling it up.
The amount of levels must be a positive number.
This will launch a level event for the gained levels.
- Parameters:
amount
- amount of levels to give- Throws:
IllegalArgumentException
- when the level amount is less than 1
-
loseLevels
public void loseLevels(int amount) Deprecated, for removal: This API element is subject to removal in a future version.
-
PlayerClass
instead