Class Skill

java.lang.Object
com.sucy.skill.api.player.Skill

@Deprecated(forRemoval=true) public class Skill extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
use Skill instead
Represents a template for a skill used in the RPG system. This is the class to extend when creating your own custom skills.
  • Constructor Details

    • Skill

      public Skill(Skill wrapped)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • isSkillDamage

      @Deprecated(forRemoval=true) public static boolean isSkillDamage()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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(forRemoval=true) public boolean hasCombo()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use Skill.hasCombo() instead.
      Checks whether the skill has been assigned a click combination.
      Returns:
      true if has a combo, false otherwise
    • canAutoLevel

      @Deprecated(forRemoval=true) public boolean canAutoLevel(int level)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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(forRemoval=true) public boolean hasMessage()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use Skill.hasMessage() instead.
      Checks whether the skill has a message to display when cast.
      Returns:
      true if has a message, false otherwise
    • clearCombo

      @Deprecated(forRemoval=true) public void clearCombo()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use Skill.clearCombo() instead.
      Clears the set combo for the skill. Only the API should call this.
    • needsPermission

      @Deprecated(forRemoval=true) public boolean needsPermission()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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(forRemoval=true) public boolean hasSkillReq()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use Skill.hasSkillReq() instead.
      Checks whether the skill requires another before leveling up
      Returns:
      true if the skill requires another skill, false otherwise
    • getDescription

      @Deprecated(forRemoval=true) public List<String> getDescription()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieves the skill's description
      Returns:
      description of the skill
    • getLevelReq

      @Deprecated(forRemoval=true) public int getLevelReq(int level)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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(forRemoval=true) public double getManaCost(int level)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieves the mana cost of the skill
      Parameters:
      level - current level of the skill
      Returns:
      mana cost
    • getCooldown

      @Deprecated(forRemoval=true) public double getCooldown(int level)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieves the cooldown of the skill in seconds
      Parameters:
      level - current level of the skill
      Returns:
      cooldown
    • cooldownMessage

      @Deprecated(forRemoval=true) public boolean cooldownMessage()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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(forRemoval=true) public double getRange(int level)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use Skill.getRange(int) instead.
      Retrieves the range of the skill in blocks
      Parameters:
      level - current level of the skill
      Returns:
      target range
    • getCost

      @Deprecated(forRemoval=true) public int getCost(int level)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use Skill.getCost(int) instead.
      Retrieves the skill point cost of the skill
      Parameters:
      level - current level of the skill
      Returns:
      skill point cost
    • getSettings

      @Deprecated(forRemoval=true) public ReadOnlySettings getSettings()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use Skill.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(forRemoval=true) public boolean canCast()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use Skill.canCast() instead.
      Checks whether this skill can be cast by players
      Returns:
      true if can be cast, false otherwise
    • getToolIndicator

      @Deprecated(forRemoval=true) public org.bukkit.inventory.ItemStack getToolIndicator()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the indicator for the skill for the GUI tools
      Returns:
      GUI tool indicator
    • getIcon

      @Deprecated(forRemoval=true) public org.bukkit.inventory.ItemStack getIcon(PlayerData data)
      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(forRemoval=true) public boolean isAllowed(org.bukkit.entity.Player player)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Checks if the player is allowed to use the skill
      Parameters:
      player - player to check
      Returns:
      true if allowed, false otherwise
    • hasDependency

      @Deprecated(forRemoval=true) public boolean hasDependency(PlayerData playerData)
      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(forRemoval=true) public boolean isCompatible(PlayerData playerData)
      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(forRemoval=true) public boolean hasInvestedEnough(PlayerData playerData)
      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(forRemoval=true) public boolean hasEnoughAttributes(PlayerData playerData)
      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(forRemoval=true) public boolean checkSingleAttribute(PlayerData playerData, String key)
      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 check
      key - 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 data
      brief - 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.
      Sends the skill message if one is present from the player to entities within the given radius.
      Parameters:
      player - player to project the message from
      radius - 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.
      Applies skill damage to the target, launching the skill damage event
      Parameters:
      target - target to receive the damage
      damage - amount of damage to deal
      source - 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 damage
      damage - amount of damage to deal
      source - 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 damage
      damage - amount of damage to deal
      source - source of the damage (skill caster)
      classification - type of damage to deal
      knockback - whether the damage should apply knockback
      ignoreDivinity - 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 damage
      damage - amount of damage to deal
      source - source of the damage (skill caster)
      classification - type of damage to deal
      knockback - whether the damage should apply knockback
      ignoreDivinity - whether the skill's damage should use divinity's overrides
      cause - 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.
      Applies skill damage to the target, launching the skill damage event and keeping the damage version compatible.
      Parameters:
      target - target to receive the damage
      damage - amount of damage to deal
      source - source of the damage (skill caster)
    • playPreview

      @Deprecated(forRemoval=true) public void playPreview(PlayerData playerData, int level)
      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 a Runnable passed to PlayerData.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.
      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.
      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.
      Loads skill data from the configuration
      Parameters:
      config - config to load from
    • getKey

      @Deprecated(forRemoval=true) public String getKey()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use Skill.getKey() instead.
      Retrieves the configuration key for the skill
      Returns:
      configuration key for the skill
    • getIndicator

      @Deprecated(forRemoval=true) public org.bukkit.inventory.ItemStack getIndicator()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieves the indicator representing the skill for menus
      Returns:
      indicator for the skill
    • getName

      @Deprecated(forRemoval=true) public String getName()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use Skill.getName() instead.
      Retrieves the name of the skill
      Returns:
      skill name
    • getType

      @Deprecated(forRemoval=true) public String getType()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use Skill.getType() instead.
      Retrieves the descriptive type of the skill
      Returns:
      descriptive type of the skill
    • getMessage

      @Deprecated(forRemoval=true) public String getMessage()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use Skill.getMessage() instead.
      Retrieves the message for the skill to display when cast.
      Returns:
      cast message of the skill
    • getSkillReq

      @Deprecated(forRemoval=true) public String getSkillReq()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use Skill.getSkillReq() instead.
      Retrieves the skill required to be upgraded before this one
      Returns:
      required skill
    • getMaxLevel

      @Deprecated(forRemoval=true) public int getMaxLevel()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use Skill.getMaxLevel() instead.
      Retrieves the max level the skill can reach
      Returns:
      max skill level
    • getSkillReqLevel

      @Deprecated(forRemoval=true) public int getSkillReqLevel()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieves the level of the required skill needed to be obtained before this one can be upgraded.
      Returns:
      required skill level
    • getCombo

      @Deprecated(forRemoval=true) public int getCombo()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use Skill.getCombo() instead.
      Retrieves the ID of the skill's combo
      Returns:
      combo ID
    • setCombo

      @Deprecated(forRemoval=true) public void setCombo(int combo)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use Skill.setCombo(int) instead.
      Sets the click combo for the skill
      Parameters:
      combo - new combo
    • getWrapped

      public Skill getWrapped()
      Deprecated, for removal: This API element is subject to removal in a future version.