Package com.sucy.skill.api.player
Class PlayerSkillSlot
java.lang.Object
com.sucy.skill.api.player.PlayerSkillSlot
Handles the skill slot for casting when bars are disabled
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()Activates the skill slot, casting the hovered itemvoidclear(PlayerSkill skill) Clears a specified skill, if availablevoidclearAll()Clears all available skillsorg.bukkit.inventory.ItemStackGets the current item that should be displayed in the skill slotvoidinit(PlayerData data) Initializes the skill slot for the given playervoidnext()Cycles to the next skillvoidprev()Cycles to the previous skillvoidunlock(PlayerSkill skill) Adds a skill to the available skills, if castablevoidupdateItem(org.bukkit.entity.Player player) Updates the displayed item for the player
-
Constructor Details
-
PlayerSkillSlot
public PlayerSkillSlot()
-
-
Method Details
-
init
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
Adds a skill to the available skills, if castable- Parameters:
skill- skill to add
-
clear
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
-