Class PlayerSkillSlot

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

public class PlayerSkillSlot extends Object
Handles the skill slot for casting when bars are disabled
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Activates the skill slot, casting the hovered item
    void
    Clears a specified skill, if available
    void
    Clears all available skills
    org.bukkit.inventory.ItemStack
    Gets the current item that should be displayed in the skill slot
    void
    Initializes the skill slot for the given player
    void
    Cycles to the next skill
    void
    Cycles to the previous skill
    void
    Adds a skill to the available skills, if castable
    void
    updateItem(org.bukkit.entity.Player player)
    Updates the displayed item for the player

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PlayerSkillSlot

      public PlayerSkillSlot()
  • Method Details

    • init

      public void init(PlayerData data)
      Initializes the skill slot for the given player
      Parameters:
      data - data of the player
    • getDisplay

      public org.bukkit.inventory.ItemStack getDisplay()
      Gets the current item that should be displayed in the skill slot
      Returns:
      item display
    • unlock

      public void unlock(PlayerSkill skill)
      Adds a skill to the available skills, if castable
      Parameters:
      skill - skill to add
    • clear

      public void clear(PlayerSkill skill)
      Clears a specified skill, if available
      Parameters:
      skill - skill to clear
    • clearAll

      public void clearAll()
      Clears all available skills
    • updateItem

      public void updateItem(org.bukkit.entity.Player player)
      Updates the displayed item for the player
      Parameters:
      player - player to update for
    • activate

      public void activate()
      Activates the skill slot, casting the hovered item
    • next

      public void next()
      Cycles to the next skill
    • prev

      public void prev()
      Cycles to the previous skill