Package com.sucy.skill.api.player
Class PlayerData
java.lang.Object
com.sucy.skill.api.player.PlayerData
Represents one account for a player which can contain one class from each group
and the skills in each of those classes. You should not instantiate this class
yourself and instead get it from the SkillAPI static methods.
In order to get a player's data, use "SkillAPI.getPlayerData(...)". Do NOT try to instantaite your own PlayerData object.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttributeModifier(String key, PlayerAttributeModifier modifier, boolean update) Adds attribute modifier to the player.voidaddSkill(Skill skill, PlayerClass parent) voidaddSkillExternally(Skill skill, PlayerClass parent, org.bukkit.NamespacedKey namespacedKey, int level) voidaddStatModifier(String key, PlayerStatModifier modifier, boolean update) Adds stat modifier to the player.voidAttempts to auto-level any skills that are able to do sobooleanbind(org.bukkit.Material mat, PlayerSkill skill) Binds a skill to a material for the player.booleancanProfess(RPGClass rpgClass) Checks whether the player can profess into the given class.booleancast(PlayerSkill skill) Casts a skill for the player.booleanCasts a skill by name for the player.booleancheck(PlayerSkill skill, boolean cooldown, boolean mana) Checks the cooldown and mana requirements for a skillvoidClears all binds the player currently hasvoidClear all of the modifiers including stat modifier and attribute modifiervoidClear all attribute modifier which is not persistentbooleanclearBind(org.bukkit.Material mat) Clears a skill binding on the material.voidclearBinds(Skill skill) Clears the skill binding for the given skill.voidClear all stat modifier which is not persistentbooleandowngradeSkill(Skill skill) Downgrades a skill owned by the player.voidendInit()Ends the initialization flag for the data.voidforceDownSkill(PlayerSkill skill) Forcefully downgrades a skill, not letting other plugins stop it and ignoring any skill requirements to do so.voidforceDownSkill(PlayerSkill skill, int amount) voidforceUpSkill(PlayerSkill skill) Forcefully upgrades a skill, not letting other plugins cancel it and ignoring any requirements to do sovoidforceUpSkill(PlayerSkill skill, int amount) intgetAttribute(String key) Gets the number of attribute points the player has between invested and bonus sources.Retrieves the player's attribute data.Get all attribute modifier from the player.intRetrieves the current number of attribute points the player hasRetrieves a map of all player attribute totals.HashMap<org.bukkit.Material,PlayerSkill> getBinds()Retrieves the bound data for the player.getBoundSkill(org.bukkit.Material mat) Retrieves a skill the player has bound by materialRetrieves the data of a class the player professed as by group.Retrieves the collection of the data for classes the player has professed as.Returns the data for the player's combosmc.promcteam.engine.mccore.config.parse.DataSectiondoubleThe hunger value here is not representative of the player's total hunger, rather the amount left of the next hunger point.intGets the number of attribute points invested in the given attributeRetrieves a map of all attributes the player invested.intdouble@Nullable PlayerClassRetrieves the data of the professed class under the main class group.doublegetMana()Retrieves the amount of mana the player currently has.doubleRetrieves the max amount of mana the player can have including bonus manaorg.bukkit.entity.PlayerRetrieves the Bukkit player object of the ownerRetrieves the name of the ownerRetrieves the name of the active map menu scheme for the playerRetrieves the name of the class shown in the skill treeRetrieves a skill of the owner by name.Retrieves the skill bar data for the ownerintgetSkillLevel(String name) Retrieves the level of a skill for the owner.Retrieves all of the skill data the player has.getStatModifiers(String key) Get all stat modifier from the player.getUUID()voidgiveAttribPoints(int amount) Gives the player attribute pointsvoidgiveAttribute(String key, int amount) Gives the player attribute points without costing attribute points.voidGives experience to the player from the given sourcevoidGives experience to the player from the given sourcebooleangiveLevels(int amount, ExpSource source) Gives levels to the player for all classes matching the experience sourcevoidgiveMana(double amount) Gives mana to the player from an unknown source.voidgiveMana(double amount, ManaSource source) Gives mana to the player from the given mana source.voidgivePoints(int amount, ExpSource source) Gives skill points to the player for all classes matching the experience sourcevoidGives the player a skill outside of the normal class skills.voidgiveSkill(Skill skill, PlayerClass parent) Gives the player a skill using the class data as a parent.booleanhasAttribute(String key) Checks whether the player has any points invested in a given attributebooleanhasClass()Checks whether the player has as least one class they have professed as.booleanChecks whether a player has a class within the given groupbooleanhasMana(double amount) Checks whether the player has at least the specified amount of manabooleanChecks if the owner has a skill by name.voidinit(org.bukkit.entity.Player player) Initializes the application of the data for the playerbooleanisBound(org.bukkit.Material mat) Checks whether the material has a skill bound to itbooleanChecks whether the player is professed as the class or any of its children.booleanisExactClass(RPGClass rpgClass) Checks whether the player is professed as the class without checking child classes.voidloseExp()Causes the player to lose experience as a penalty (generally for dying)voidloseExp(double amount, boolean percent, boolean changeLevel) Causes the player to lose experience This will launch aPlayerExperienceLostEventevent before taking the experience.voidloseLevels(int amount) Causes the player to lose levelsbooleanOpens the attribute menu for the playerbooleanProfesses the player into the class if they are able to.voidrecord(org.bukkit.entity.Player player) Records any data to save with class databooleanrefundAttribute(String key) Refunds an attribute point from the given attribute if there are any points invested in it.voidRefunds all spent attribute pointsvoidrefundAttributes(String key) Refunds all spent attribute points for a specific attributevoidrefundSkill(PlayerSkill skill) Refunds a skill for the player, resetting it down to level 0 and giving back any invested skill points.voidRefunds all skills for the playervoidRegenerates mana for the player based on the regen amounts of professed classesvoidremoveAttributeModifier(UUID uuid, boolean update) Remove attribute modifier with the exact uuidvoidremoveSkillExternally(Skill skill, org.bukkit.NamespacedKey namespacedKey) voidremoveStatModifier(UUID uuid, boolean update) Remove stat modifier with the exact uuidintResets the class data for the owner under the given group.voidresetAll()Resets all profession data for the player.voidResets attributes for the playerdoublescaleDynamic(EffectComponent component, String key, double value) Scales a dynamic skill's value using global modifiersdoubleScales a stat value using the player's attributesdoubleScales a stat value using the player's attributesvoidsetAttribPoints(int amount) Sets the current amount of attribute pointsSets the professed class for the player for the corresponding group.voidsetHungerValue(double hungerValue) voidsetLastHealth(double health) Used by the API for restoring health - do not use this.voidsetMana(double amount) Sets the player's amount of mana without launching eventsvoidSets the active scheme name for the playerbooleanshowDetails(org.bukkit.entity.Player player) Shows the class details for the playerbooleanshowProfession(org.bukkit.entity.Player player) Shows profession options of the first class group availablevoidShows the skill tree for the player.booleanshowSkills(org.bukkit.entity.Player player) Shows the skill tree for the player.booleanshowSkills(org.bukkit.entity.Player player, PlayerClass playerClass) Shows the skill tree to the player for the given classvoidstartPassives(org.bukkit.entity.Player player) Starts passive abilities for the player if they are online.voidstopPassives(org.bukkit.entity.Player player) Stops passive abilities for the player if they are online.intsubtractHungerValue(double amount) booleanupAttribute(String key) Invests a point in the attribute if the player has any remaining attribute points.voidupdateHealth(org.bukkit.entity.Player player) Updates health of a player based on their current attributes and applyvoidupdatePlayerStat(org.bukkit.entity.Player player) Updates all the stats of a player based on their current attributes This method is very heavy, consume resources and notable by player Checkout other method such asupdateWalkSpeed(Player)for a light refresh
This also does not update the player equipment You will need to callPlayerEquips.update(Player)before this function to update attribute/stats that comes with equipmentsvoidUpdates the scoreboard with the player's current class.voidupdateWalkSpeed(org.bukkit.entity.Player player) Updates walk speed of a player based on their current attributes and applybooleanupgradeSkill(Skill skill) Upgrades a skill owned by the player.voiduseMana(double amount) Takes mana away from the player for an unknown reason.voidTakes mana away from the player for the specified reason.
-
Field Details
-
attributes
-
attribPoints
public int attribPoints
-
-
Method Details
-
getPlayer
public org.bukkit.entity.Player getPlayer()Retrieves the Bukkit player object of the owner- Returns:
- Bukkit player object of the owner or null if offline
-
getPlayerName
Retrieves the name of the owner- Returns:
- name of the owner
-
getUUID
-
getSkillBar
Retrieves the skill bar data for the owner- Returns:
- skill bar data of the owner
-
getCastBars
- Returns:
- cast bars data for the player
-
getComboData
Returns the data for the player's combos- Returns:
- combo data for the player
-
getExtraData
public mc.promcteam.engine.mccore.config.parse.DataSection getExtraData()- Returns:
- extra data attached to the player's account
-
getEquips
- Returns:
- equipped item data
-
getLastHealth
public double getLastHealth()- Returns:
- health during last logout
-
setLastHealth
public void setLastHealth(double health) Used by the API for restoring health - do not use this.- Parameters:
health- health logged off with
-
getHungerValue
public double getHungerValue()The hunger value here is not representative of the player's total hunger, rather the amount left of the next hunger point. This is manipulated by attributes were if an attribute says a player has twice as much "hunger" as normal, this will go down by decimals to slow the decay of hunger.- Returns:
- amount of the next hunger point the player has
-
setHungerValue
public void setHungerValue(double hungerValue) - Parameters:
hungerValue- new hunger value- See Also:
-
subtractHungerValue
public int subtractHungerValue(double amount) -
endInit
public void endInit()Ends the initialization flag for the data. Used by the API to avoid async issues. Do not use this in other plugins. -
getScheme
Retrieves the name of the active map menu scheme for the player- Returns:
- map menu scheme name
-
setScheme
Sets the active scheme name for the player- Parameters:
name- name of the scheme
-
getAttributes
Retrieves a map of all player attribute totals. Modifying the map will not change actual player attributes.- Returns:
- attribute totals
-
getInvestedAttributes
Retrieves a map of all attributes the player invested. This doesn't count base attributes from classes or bonus attributes from effects. Modifying the map will not change actual player attributes.- Returns:
- attribute totals
-
getAttribute
Gets the number of attribute points the player has between invested and bonus sources.- Parameters:
key- attribute key- Returns:
- number of total points
-
getInvestedAttribute
Gets the number of attribute points invested in the given attribute- Parameters:
key- attribute key- Returns:
- number of invested points
-
hasAttribute
Checks whether the player has any points invested in a given attribute- Parameters:
key- attribute key- Returns:
- true if any points are invested, false otherwise
-
upAttribute
Invests a point in the attribute if the player has any remaining attribute points. If the player has no remaining points, this will do nothing.- Parameters:
key- attribute key- Returns:
- whether it was successfully upgraded
-
giveAttribute
Gives the player attribute points without costing attribute points.- Parameters:
key- attribute to give points foramount- amount to give
-
addStatModifier
Adds stat modifier to the player. These bypass min/max invest amount and cannot be refunded.- Parameters:
key- stat keymodifier- The player stat modifierupdate- calculate player stat immediately and apply to him
-
getStatModifiers
Get all stat modifier from the player.- Parameters:
key- stat key- Returns:
- stat modifier list of the attribute given
-
addAttributeModifier
Adds attribute modifier to the player. These bypass min/max invest amount and cannot be refunded.- Parameters:
key- attribute keymodifier- The player attribute modifierupdate- calculate player stat immediately and apply to him
-
getAttributeModifiers
Get all attribute modifier from the player.- Parameters:
key- attribute key- Returns:
- attribute modifier list of the attribute given
-
refundAttribute
Refunds an attribute point from the given attribute if there are any points invested in it. If there are none, this will do nothing.- Parameters:
key- attribute key
-
refundAttributes
Refunds all spent attribute points for a specific attribute -
refundAttributes
public void refundAttributes()Refunds all spent attribute points -
getAttributePoints
public int getAttributePoints()Retrieves the current number of attribute points the player has- Returns:
- attribute point total
-
giveAttribPoints
public void giveAttribPoints(int amount) Gives the player attribute points- Parameters:
amount- amount of attribute points
-
setAttribPoints
public void setAttribPoints(int amount) Sets the current amount of attribute points- Parameters:
amount- amount of points to have
-
scaleStat
Scales a stat value using the player's attributes- Parameters:
stat- stat keybaseValue- the default value come with vanilla Minecraft, Only needed for custom stats and Speed- Returns:
- modified value
-
scaleStat
Scales a stat value using the player's attributes- Parameters:
stat- stat keydefaultValue- the default value come with vanilla Minecraft, Only needed for custom stats and Speedmin- min valuemax- max value- Returns:
- modified value
-
scaleDynamic
Scales a dynamic skill's value using global modifiers- Parameters:
component- component holding the valuekey- key of the valuevalue- unmodified value- Returns:
- the modified value
-
openAttributeMenu
public boolean openAttributeMenu()Opens the attribute menu for the player- Returns:
- true if successfully opened, false if conditions weren't met
-
getAttributeData
Retrieves the player's attribute data. Modifying this will modify the player's actual data.- Returns:
- the player's attribute data
-
hasSkill
Checks if the owner has a skill by name. This is not case-sensitive and does not check to see if the skill is unlocked. It only checks if the skill is available to upgrade/use.- Parameters:
name- name of the skill- Returns:
- true if has the skill, false otherwise
-
getSkill
Retrieves a skill of the owner by name. This is not case-sensitive.- Parameters:
name- name of the skill- Returns:
- data for the skill or null if the player doesn't have the skill
-
getInvestedSkillPoints
public int getInvestedSkillPoints() -
getSkills
Retrieves all of the skill data the player has. Modifying this collection will not modify the player's owned skills but modifying one of the elements will change that element's data for the player.- Returns:
- collection of skill data for the owner
-
getExternallyAddedSkills
-
getSkillLevel
Retrieves the level of a skill for the owner. This is not case-sensitive.- Parameters:
name- name of the skill- Returns:
- level of the skill or 0 if not found
-
giveSkill
Gives the player a skill outside of the normal class skills. This skill will not show up in a skill tree.- Parameters:
skill- skill to give the player
-
giveSkill
Gives the player a skill using the class data as a parent. This skill will not show up in a skill tree.- Parameters:
skill- skill to give the playerparent- parent class data
-
addSkill
-
addSkillExternally
public void addSkillExternally(Skill skill, PlayerClass parent, org.bukkit.NamespacedKey namespacedKey, int level) -
removeSkillExternally
-
autoLevel
public void autoLevel()Attempts to auto-level any skills that are able to do so -
upgradeSkill
Upgrades a skill owned by the player. The player must own the skill, have enough skill points, meet the level and skill requirements, and not have maxed out the skill already in order to upgrade the skill. This will consume the skill point cost while upgrading the skill.- Parameters:
skill- skill to upgrade- Returns:
- true if successfully was upgraded, false otherwise
-
forceUpSkill
Forcefully upgrades a skill, not letting other plugins cancel it and ignoring any requirements to do so- Parameters:
skill- skill to forcefully upgrade
-
forceUpSkill
-
downgradeSkill
Downgrades a skill owned by the player. The player must own the skill and it must not currently be level 0 for the player to downgrade the skill. This will refund the skill point cost when downgrading the skill.- Parameters:
skill- skill to downgrade- Returns:
- true if successfully downgraded, false otherwise
-
forceDownSkill
Forcefully downgrades a skill, not letting other plugins stop it and ignoring any skill requirements to do so.- Parameters:
skill- skill to forcefully downgrade
-
forceDownSkill
-
refundSkill
Refunds a skill for the player, resetting it down to level 0 and giving back any invested skill points.- Parameters:
skill- skill to refund
-
refundSkills
public void refundSkills()Refunds all skills for the player -
showSkills
public void showSkills()Shows the skill tree for the player. If the player has multiple trees, this will show the list of skill trees they can view. -
showDetails
public boolean showDetails(org.bukkit.entity.Player player) Shows the class details for the player- Parameters:
player- player to show to- Returns:
- true if shown, false if nothing to show
-
showProfession
public boolean showProfession(org.bukkit.entity.Player player) Shows profession options of the first class group available- Parameters:
player- player to show profession options for- Returns:
- true if shown profession options, false if none available
-
showSkills
public boolean showSkills(org.bukkit.entity.Player player) Shows the skill tree for the player. If the player has multiple trees, this will show the list of skill trees they can view.- Parameters:
player- player to show the skill tree for- Returns:
- true if able to show the player, false otherwise
-
showSkills
Shows the skill tree to the player for the given class- Parameters:
player- player to showplayerClass- class to look for- Returns:
- true if succeeded, false otherwise
-
getShownClassName
Retrieves the name of the class shown in the skill tree- Returns:
- class name
-
hasClass
public boolean hasClass()Checks whether the player has as least one class they have professed as.- Returns:
- true if professed, false otherwise
-
hasClass
Checks whether a player has a class within the given group- Parameters:
group- class group to check- Returns:
- true if has a class in the group, false otherwise
-
getClasses
Retrieves the collection of the data for classes the player has professed as.- Returns:
- collection of the data for professed classes
-
getClass
Retrieves the data of a class the player professed as by group. This is case-sensitive.- Parameters:
group- group to get the profession for- Returns:
- professed class data or null if not professed for the group
-
getMainClass
Retrieves the data of the professed class under the main class group. The "main" group is determined by the setting in the config.- Returns:
- main professed class data or null if not professed for the main group
-
setClass
Sets the professed class for the player for the corresponding group. This will not save any skills, experience, or levels of the previous class if there was any. The new class will start at level 1 with 0 experience.- Parameters:
rpgClass- class to assign to the player- Returns:
- the player-specific data for the new class
-
isExactClass
Checks whether the player is professed as the class without checking child classes.- Parameters:
rpgClass- class to check- Returns:
- true if professed as the specific class, false otherwise
-
isClass
Checks whether the player is professed as the class or any of its children.- Parameters:
rpgClass- class to check- Returns:
- true if professed as the class or one of its children, false otherwise
-
canProfess
Checks whether the player can profess into the given class. This checks to make sure the player is currently professed as the parent of the given class and is high enough of a level to do so.- Parameters:
rpgClass- class to check- Returns:
- true if can profess, false otherwise
-
reset
Resets the class data for the owner under the given group. This will remove the profession entirely, leaving no remaining data until the player professes again to a starting class.- Parameters:
group- group to resettoSubclass- - whether we are professing to a subclass of the previous class- Returns:
- the number of skill points to be refunded
-
resetAll
public void resetAll()Resets all profession data for the player. This clears all professions the player has, leaving no remaining data until the player professes again to a starting class. -
resetAttribs
public void resetAttribs()Resets attributes for the player -
profess
Professes the player into the class if they are able to. This will reset the class data if the group options are set to reset upon profession. Otherwise, all skills, experience, and levels of the current class under the group will be retained and carried over into the new profession.- Parameters:
rpgClass- class to profess into- Returns:
- true if successfully professed, false otherwise
-
giveExp
Gives experience to the player from the given source- Parameters:
amount- amount of experience to givesource- source of the experience
-
giveExp
Gives experience to the player from the given source- Parameters:
amount- amount of experience to givesource- source of the experiencemessage- whether to show the configured message if enabled
-
loseExp
public void loseExp(double amount, boolean percent, boolean changeLevel) Causes the player to lose experience This will launch aPlayerExperienceLostEventevent before taking the experience.- Parameters:
amount- percent of experience to losepercent- whether to take the amount as a percentage
-
loseExp
public void loseExp()Causes the player to lose experience as a penalty (generally for dying) -
giveLevels
Gives levels to the player for all classes matching the experience source- Parameters:
amount- amount of levels to givesource- source of the levels
-
loseLevels
public void loseLevels(int amount) Causes the player to lose levels -
givePoints
Gives skill points to the player for all classes matching the experience source- Parameters:
amount- amount of levels to givesource- source of the levels
-
updatePlayerStat
public void updatePlayerStat(org.bukkit.entity.Player player) Updates all the stats of a player based on their current attributes This method is very heavy, consume resources and notable by player Checkout other method such asupdateWalkSpeed(Player)for a light refresh
This also does not update the player equipment You will need to callPlayerEquips.update(Player)before this function to update attribute/stats that comes with equipments -
updateWalkSpeed
public void updateWalkSpeed(org.bukkit.entity.Player player) Updates walk speed of a player based on their current attributes and apply- Parameters:
player- the player
-
updateHealth
public void updateHealth(org.bukkit.entity.Player player) Updates health of a player based on their current attributes and apply- Parameters:
player- the player
-
getMana
public double getMana()Retrieves the amount of mana the player currently has.- Returns:
- current player mana
-
setMana
public void setMana(double amount) Sets the player's amount of mana without launching events- Parameters:
amount- current mana
-
hasMana
public boolean hasMana(double amount) Checks whether the player has at least the specified amount of mana- Parameters:
amount- required mana amount- Returns:
- true if has the amount of mana, false otherwise
-
getMaxMana
public double getMaxMana()Retrieves the max amount of mana the player can have including bonus mana- Returns:
- max amount of mana the player can have
-
regenMana
public void regenMana()Regenerates mana for the player based on the regen amounts of professed classes -
giveMana
public void giveMana(double amount) Gives mana to the player from an unknown source. This will not cause the player's mana to go above their max amount.- Parameters:
amount- amount of mana to give
-
giveMana
Gives mana to the player from the given mana source. This will not cause the player's mana to go above the max amount.- Parameters:
amount- amount of mana to givesource- source of the mana
-
useMana
public void useMana(double amount) Takes mana away from the player for an unknown reason. This will not cause the player to fall below 0 mana.- Parameters:
amount- amount of mana to take away
-
useMana
Takes mana away from the player for the specified reason. This will not cause the player to fall below 0 mana.- Parameters:
amount- amount of mana to take awaycost- source of the mana cost
-
removeStatModifier
Remove stat modifier with the exact uuid- Parameters:
uuid- The uuidupdate- calculate player stat immediately and apply to him
-
clearStatModifier
public void clearStatModifier()Clear all stat modifier which is not persistent -
removeAttributeModifier
Remove attribute modifier with the exact uuid- Parameters:
uuid- The uuidupdate- calculate player stat immediately and apply to him
-
clearAttributeModifiers
public void clearAttributeModifiers()Clear all attribute modifier which is not persistent -
clearAllModifiers
public void clearAllModifiers()Clear all of the modifiers including stat modifier and attribute modifier -
getBoundSkill
Retrieves a skill the player has bound by material- Parameters:
mat- material to get the bind for- Returns:
- skill bound to the material or null if none are bound
-
getBinds
Retrieves the bound data for the player. Modifying this map will modify the bindings the player has.- Returns:
- the skill binds data for the player
-
isBound
public boolean isBound(org.bukkit.Material mat) Checks whether the material has a skill bound to it- Parameters:
mat- material to check- Returns:
- true if a skill is bound to it, false otherwise
-
bind
Binds a skill to a material for the player. The bind will not work if the skill was already bound to the material.- Parameters:
mat- material to bind the skill toskill- skill to bind to the material- Returns:
- true if was able to bind the skill, false otherwise
-
clearBind
public boolean clearBind(org.bukkit.Material mat) Clears a skill binding on the material. If there is no binding on the material, this will do nothing.- Parameters:
mat- material to clear bindings from- Returns:
- true if a binding was cleared, false otherwise
-
clearBinds
Clears the skill binding for the given skill. This will remove the bindings on all materials involving the skill.- Parameters:
skill- skill to unbind
-
clearAllBinds
public void clearAllBinds()Clears all binds the player currently has -
record
public void record(org.bukkit.entity.Player player) Records any data to save with class data- Parameters:
player- player to record for
-
updateScoreboard
public void updateScoreboard()Updates the scoreboard with the player's current class. This is already done by the API and doesn't need to be done by other plugins. -
startPassives
public void startPassives(org.bukkit.entity.Player player) Starts passive abilities for the player if they are online. This is already called by the API and shouldn't be called by other plugins.- Parameters:
player- player to set the passive skills up for
-
stopPassives
public void stopPassives(org.bukkit.entity.Player player) Stops passive abilities for the player if they are online. This is already called by the API and shouldn't be called by other plugins.- Parameters:
player- player to stop the passive skills for
-
cast
Casts a skill by name for the player. In order to cast the skill, the player must be online, have the skill unlocked, have enough mana, have the skill off cooldown, and have a proper target if applicable.- Parameters:
skillName- name of the skill ot cast- Returns:
- true if successfully cast the skill, false otherwise
-
cast
Casts a skill for the player. In order to cast the skill, the player must be online, have the skill unlocked, have enough mana, have the skill off cooldown, and have a proper target if applicable.- Parameters:
skill- skill to cast- Returns:
- true if successfully cast the skill, false otherwise
-
check
Checks the cooldown and mana requirements for a skill- Parameters:
skill- skill to check forcooldown- whether to check cooldownsmana- whether to check mana requirements- Returns:
- true if can use
-
init
public void init(org.bukkit.entity.Player player) Initializes the application of the data for the player- Parameters:
player- player to set up for
-