Package com.sucy.skill.api.player
Class Skill
java.lang.Object
com.sucy.skill.api.player.Skill
Deprecated, for removal: This API element is subject to removal in a future version.
Represents a template for a skill used in the RPG system. This is
the class to extend when creating your own custom skills.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
canAutoLevel
(int level) Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.canAutoLevel(int)
instead.boolean
canCast()
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.canCast()
instead.boolean
checkSingleAttribute
(PlayerData playerData, String key) Deprecated, for removal: This API element is subject to removal in a future version.void
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.clearCombo()
instead.boolean
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.cooldownMessage()
instead.void
damage
(org.bukkit.entity.LivingEntity target, double damage, org.bukkit.entity.LivingEntity source) Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.damage(LivingEntity, double, LivingEntity)
instead.void
damage
(org.bukkit.entity.LivingEntity target, double damage, org.bukkit.entity.LivingEntity source, String classification) Deprecated, for removal: This API element is subject to removal in a future version.void
damage
(org.bukkit.entity.LivingEntity target, double damage, org.bukkit.entity.LivingEntity source, String classification, boolean knockback, boolean ignoreDivinity) Deprecated, for removal: This API element is subject to removal in a future version.void
damage
(org.bukkit.entity.LivingEntity target, double damage, org.bukkit.entity.LivingEntity source, String classification, boolean knockback, boolean ignoreDivinity, org.bukkit.event.entity.EntityDamageEvent.DamageCause cause) Deprecated, for removal: This API element is subject to removal in a future version.int
getCombo()
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getCombo()
instead.double
getCooldown
(int level) Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getCooldown(int)
instead.int
getCost
(int level) Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getCost(int)
instead.Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getDescription()
instead.org.bukkit.inventory.ItemStack
getIcon
(PlayerData data) Deprecated, for removal: This API element is subject to removal in a future version.org.bukkit.inventory.ItemStack
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getIndicator()
instead.org.bukkit.inventory.ItemStack
getIndicator
(PlayerSkill skillData) Deprecated, for removal: This API element is subject to removal in a future version.org.bukkit.inventory.ItemStack
getIndicator
(PlayerSkill skillData, boolean brief) Deprecated, for removal: This API element is subject to removal in a future version.getKey()
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getKey()
instead.int
getLevelReq
(int level) Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getLevelReq(int)
instead.double
getManaCost
(int level) Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getManaCost(int)
instead.int
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getMaxLevel()
instead.Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getMessage()
instead.getName()
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getName()
instead.double
getRange
(int level) Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getRange(int)
instead.Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getSettings()
instead.Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getSkillReq()
instead.int
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getSkillReqLevel()
instead.org.bukkit.inventory.ItemStack
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getToolIndicator()
instead.getType()
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getType()
instead.Deprecated, for removal: This API element is subject to removal in a future version.boolean
hasCombo()
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.hasCombo()
instead.boolean
hasDependency
(PlayerData playerData) Deprecated, for removal: This API element is subject to removal in a future version.boolean
hasEnoughAttributes
(PlayerData playerData) Deprecated, for removal: This API element is subject to removal in a future version.boolean
hasInvestedEnough
(PlayerData playerData) Deprecated, for removal: This API element is subject to removal in a future version.boolean
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.hasMessage()
instead.boolean
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.hasSkillReq()
instead.boolean
isAllowed
(org.bukkit.entity.Player player) Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.isAllowed(Player)
instead.boolean
isCompatible
(PlayerData playerData) Deprecated, for removal: This API element is subject to removal in a future version.static boolean
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.isSkillDamage()
instead.void
load
(studio.magemonkey.codex.mccore.config.parse.DataSection config) Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.load(DataSection)
instead.boolean
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.needsPermission()
instead.void
playPreview
(PlayerData playerData, int level) Deprecated, for removal: This API element is subject to removal in a future version.void
save
(studio.magemonkey.codex.mccore.config.parse.DataSection config) Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.save(DataSection)
instead.void
sendMessage
(org.bukkit.entity.Player player, double radius) Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.sendMessage(Player, double)
instead.void
setCombo
(int combo) Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.setCombo(int)
instead.void
softSave
(studio.magemonkey.codex.mccore.config.parse.DataSection config) Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.softSave(DataSection)
instead.void
trueDamage
(org.bukkit.entity.LivingEntity target, double damage, org.bukkit.entity.LivingEntity source) Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.trueDamage(LivingEntity, double, LivingEntity)
instead.
-
Constructor Details
-
Skill
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
isSkillDamage
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.isSkillDamage()
instead.Checks whether the current damage event is due to skills damaging an entity. This method is used by the API and shouldn't be used by other plugins.- Returns:
- true if caused by a skill, false otherwise
-
hasCombo
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.hasCombo()
instead.Checks whether the skill has been assigned a click combination.- Returns:
- true if has a combo, false otherwise
-
canAutoLevel
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.canAutoLevel(int)
instead.Checks whether the skill can automatically level up to the next stage.- Parameters:
level
- - the current level of the skill- Returns:
- true if skill can level up automatically to the next level, false otherwise
-
hasMessage
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.hasMessage()
instead.Checks whether the skill has a message to display when cast.- Returns:
- true if has a message, false otherwise
-
clearCombo
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.clearCombo()
instead.Clears the set combo for the skill. Only the API should call this. -
needsPermission
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.needsPermission()
instead.Checks whether the skill needs a permission for a player to use it.- Returns:
- true if the skill requires a permission to use
-
hasSkillReq
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.hasSkillReq()
instead.Checks whether the skill requires another before leveling up- Returns:
- true if the skill requires another skill, false otherwise
-
getDescription
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getDescription()
instead.Retrieves the skill's description- Returns:
- description of the skill
-
getLevelReq
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getLevelReq(int)
instead.Retrieves the level requirement for the skill to reach the next level- Parameters:
level
- current level of the skill- Returns:
- level requirement for the next level
-
getManaCost
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getManaCost(int)
instead.Retrieves the mana cost of the skill- Parameters:
level
- current level of the skill- Returns:
- mana cost
-
getCooldown
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getCooldown(int)
instead.Retrieves the cooldown of the skill in seconds- Parameters:
level
- current level of the skill- Returns:
- cooldown
-
cooldownMessage
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.cooldownMessage()
instead.Checks whether a message is sent when attempting to run the skill while in cooldown- Returns:
- true if the message is sent, false otherwise
-
getRange
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getRange(int)
instead.Retrieves the range of the skill in blocks- Parameters:
level
- current level of the skill- Returns:
- target range
-
getCost
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getCost(int)
instead.Retrieves the skill point cost of the skill- Parameters:
level
- current level of the skill- Returns:
- skill point cost
-
getSettings
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getSettings()
instead.Retrieves the settings for the skill in a read-only format- Returns:
- settings for the skill in a read-only format
-
canCast
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.canCast()
instead.Checks whether this skill can be cast by players- Returns:
- true if can be cast, false otherwise
-
getToolIndicator
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getToolIndicator()
instead.Gets the indicator for the skill for the GUI tools- Returns:
- GUI tool indicator
-
getIcon
Deprecated, for removal: This API element is subject to removal in a future version.Fetches the icon for the skill for the player- Parameters:
data
- player to get for- Returns:
- the skill icon
-
isAllowed
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.isAllowed(Player)
instead.Checks if the player is allowed to use the skill- Parameters:
player
- player to check- Returns:
- true if allowed, false otherwise
-
hasDependency
Deprecated, for removal: This API element is subject to removal in a future version.Checks if the player has the required skill dependency- Parameters:
playerData
- player data to check- Returns:
- true if has dependency, false otherwise
-
isCompatible
Deprecated, for removal: This API element is subject to removal in a future version.Checks if the skill is compatible with the player's other skills- Parameters:
playerData
- player data to check- Returns:
- true if compatible, false otherwise
-
hasInvestedEnough
Deprecated, for removal: This API element is subject to removal in a future version.Checks if the player has invested enough points in the skill- Parameters:
playerData
- player data to check- Returns:
- true if invested enough, false otherwise
-
hasEnoughAttributes
Deprecated, for removal: This API element is subject to removal in a future version.Checks if the player has enough attributes for the skill- Parameters:
playerData
- player data to check- Returns:
- true if has enough attributes, false otherwise
-
checkSingleAttribute
Deprecated, for removal: This API element is subject to removal in a future version.Checks if the player has a specific attribute for the skill- Parameters:
playerData
- player data to checkkey
- attribute key to check- Returns:
- true if has the attribute, false otherwise
-
getIndicator
@Deprecated(forRemoval=true) public org.bukkit.inventory.ItemStack getIndicator(PlayerSkill skillData, boolean brief) Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the indicator for the skill while applying filters to match the player-specific data.- Parameters:
skillData
- player databrief
- whether to show brief information- Returns:
- filtered skill indicator
-
getIndicator
@Deprecated(forRemoval=true) public org.bukkit.inventory.ItemStack getIndicator(PlayerSkill skillData) Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the indicator for the skill while applying filters to match- Parameters:
skillData
-- Returns:
-
sendMessage
@Deprecated(forRemoval=true) public void sendMessage(org.bukkit.entity.Player player, double radius) Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.sendMessage(Player, double)
instead.Sends the skill message if one is present from the player to entities within the given radius.- Parameters:
player
- player to project the message fromradius
- radius to include targets of the message
-
damage
@Deprecated(forRemoval=true) public void damage(org.bukkit.entity.LivingEntity target, double damage, org.bukkit.entity.LivingEntity source) Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.damage(LivingEntity, double, LivingEntity)
instead.Applies skill damage to the target, launching the skill damage event- Parameters:
target
- target to receive the damagedamage
- amount of damage to dealsource
- source of the damage (skill caster)
-
damage
@Deprecated(forRemoval=true) public void damage(org.bukkit.entity.LivingEntity target, double damage, org.bukkit.entity.LivingEntity source, String classification) Deprecated, for removal: This API element is subject to removal in a future version.Applies skill damage to the target, launching the skill damage event- Parameters:
target
- target to receive the damagedamage
- amount of damage to dealsource
- source of the damage (skill caster)classification
- type of damage to deal
-
damage
@Deprecated(forRemoval=true) public void damage(org.bukkit.entity.LivingEntity target, double damage, org.bukkit.entity.LivingEntity source, String classification, boolean knockback, boolean ignoreDivinity) Deprecated, for removal: This API element is subject to removal in a future version.Applies skill damage to the target, launching the skill damage event- Parameters:
target
- target to receive the damagedamage
- amount of damage to dealsource
- source of the damage (skill caster)classification
- type of damage to dealknockback
- whether the damage should apply knockbackignoreDivinity
- whether the skill's damage should use divinity's overrides
-
damage
@Deprecated(forRemoval=true) public void damage(org.bukkit.entity.LivingEntity target, double damage, org.bukkit.entity.LivingEntity source, String classification, boolean knockback, boolean ignoreDivinity, org.bukkit.event.entity.EntityDamageEvent.DamageCause cause) Deprecated, for removal: This API element is subject to removal in a future version.Applies skill damage to the target, launching the skill damage event- Parameters:
target
- target to receive the damagedamage
- amount of damage to dealsource
- source of the damage (skill caster)classification
- type of damage to dealknockback
- whether the damage should apply knockbackignoreDivinity
- whether the skill's damage should use divinity's overridescause
- the cause of the damage, might affect death messages
-
trueDamage
@Deprecated(forRemoval=true) public void trueDamage(org.bukkit.entity.LivingEntity target, double damage, org.bukkit.entity.LivingEntity source) Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.trueDamage(LivingEntity, double, LivingEntity)
instead.Applies skill damage to the target, launching the skill damage event and keeping the damage version compatible.- Parameters:
target
- target to receive the damagedamage
- amount of damage to dealsource
- source of the damage (skill caster)
-
playPreview
Deprecated, for removal: This API element is subject to removal in a future version.Starts the skill's preview effects. Removal of any registered listeners, tasks, entities, or other temporary effects should be included in aRunnable
passed toPlayerData.setOnPreviewStop(Runnable)
-
save
@Deprecated(forRemoval=true) public void save(studio.magemonkey.codex.mccore.config.parse.DataSection config) Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.save(DataSection)
instead.Saves the skill data to the configuration, overwriting all previous data- Parameters:
config
- config to save to
-
softSave
@Deprecated(forRemoval=true) public void softSave(studio.magemonkey.codex.mccore.config.parse.DataSection config) Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.softSave(DataSection)
instead.Saves some skill data to the config, avoiding overwriting any pre-existing data- Parameters:
config
- config to save to
-
load
@Deprecated(forRemoval=true) public void load(studio.magemonkey.codex.mccore.config.parse.DataSection config) Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.load(DataSection)
instead.Loads skill data from the configuration- Parameters:
config
- config to load from
-
getKey
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getKey()
instead.Retrieves the configuration key for the skill- Returns:
- configuration key for the skill
-
getIndicator
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getIndicator()
instead.Retrieves the indicator representing the skill for menus- Returns:
- indicator for the skill
-
getName
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getName()
instead.Retrieves the name of the skill- Returns:
- skill name
-
getType
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getType()
instead.Retrieves the descriptive type of the skill- Returns:
- descriptive type of the skill
-
getMessage
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getMessage()
instead.Retrieves the message for the skill to display when cast.- Returns:
- cast message of the skill
-
getSkillReq
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getSkillReq()
instead.Retrieves the skill required to be upgraded before this one- Returns:
- required skill
-
getMaxLevel
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getMaxLevel()
instead.Retrieves the max level the skill can reach- Returns:
- max skill level
-
getSkillReqLevel
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getSkillReqLevel()
instead.Retrieves the level of the required skill needed to be obtained before this one can be upgraded.- Returns:
- required skill level
-
getCombo
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.getCombo()
instead.Retrieves the ID of the skill's combo- Returns:
- combo ID
-
setCombo
Deprecated, for removal: This API element is subject to removal in a future version.UseSkill.setCombo(int)
instead.Sets the click combo for the skill- Parameters:
combo
- new combo
-
getWrapped
Deprecated, for removal: This API element is subject to removal in a future version.
-
Skill
instead