public class WauzPlayerSkillExecutor
extends java.lang.Object
WauzPlayerSkill| Modifier and Type | Field and Description |
|---|---|
private static java.util.Map<java.lang.String,WauzPlayerSkill> |
playerSkillMap
A map of all registered skills.
|
private static java.util.List<java.lang.String> |
skillgemIds
A list of all skill ids, that can be obtained as skillgem.
|
| Constructor and Description |
|---|
WauzPlayerSkillExecutor() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
execute(org.bukkit.entity.Player player,
org.bukkit.inventory.ItemStack itemStack,
WauzPlayerSkill skill)
Uses a skill for a player.
|
static java.util.List<java.lang.String> |
getAllSkillgemIds() |
static java.util.List<java.lang.String> |
getAllSkillIds() |
static java.util.List<WauzPlayerSkill> |
getAllSkills() |
static WauzPlayerSkill |
getSkill(java.lang.String skillId)
Gets a skill for the given id from the map.
|
static int |
getSkillTypesCount() |
static void |
registerSkill(WauzPlayerSkill skill)
Registers a skill, that can be obtained as skillgem.
|
static void |
registerSkill(WauzPlayerSkill skill,
boolean skillgem)
Registers a skill.
|
static void |
tryToUseSkill(org.bukkit.entity.Player player,
org.bukkit.inventory.ItemStack itemStack)
Tries to use a skill for a player.
|
static void |
tryToUseSkill(org.bukkit.entity.Player player,
org.bukkit.inventory.ItemStack itemStack,
WauzPlayerSkill skill)
Tries to use a skill for a player.
|
private static java.util.Map<java.lang.String,WauzPlayerSkill> playerSkillMap
private static java.util.List<java.lang.String> skillgemIds
public static WauzPlayerSkill getSkill(java.lang.String skillId)
skillId - The id of the skill.public static java.util.List<WauzPlayerSkill> getAllSkills()
public static java.util.List<java.lang.String> getAllSkillIds()
public static java.util.List<java.lang.String> getAllSkillgemIds()
public static int getSkillTypesCount()
public static void registerSkill(WauzPlayerSkill skill)
skill - The skill to register.public static void registerSkill(WauzPlayerSkill skill, boolean skillgem)
skill - The skill to register.skillgem - If the skill can be obtained as skillgem.public static void tryToUseSkill(org.bukkit.entity.Player player,
org.bukkit.inventory.ItemStack itemStack)
player - The player that should use the skill.itemStack - The item that skill is bound to.EquipmentUtils.getSocketedSkill(ItemStack),
tryToUseSkill(Player, ItemStack, WauzPlayerSkill)public static void tryToUseSkill(org.bukkit.entity.Player player,
org.bukkit.inventory.ItemStack itemStack,
WauzPlayerSkill skill)
player - The player that should use the skill.itemStack - The item that is used to cast the skill.skill - The skill to use.EquipmentUtils.getLevelRequirement(ItemStack),
Cooldown.playerSkillUse(Player),
execute(Player, ItemStack, WauzPlayerSkill)public static boolean execute(org.bukkit.entity.Player player,
org.bukkit.inventory.ItemStack itemStack,
WauzPlayerSkill skill)
player - The player that should use the skill.itemStack - The item that is used to cast the skill.skill - The skill to use.WauzPlayerDataSectionSkills.isSkillReady(String),
ManaCalculator.useMana(Player, int),
RageCalculator.useRage(Player, int),
WauzPlayerSkill.executeSkill(Player, ItemStack),
WauzDebugger.toggleMagicDebugMode(Player),
WauzPlayerActionBar.update(Player)