Package dev.aurelium.auraskills.api.item
Interface ItemManager
public interface ItemManager
-
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.inventory.ItemStackaddModifier(org.bukkit.inventory.ItemStack item, ModifierType type, Stat stat, double value, boolean lore) Adds a modifier to an item, with optional lore.org.bukkit.inventory.ItemStackaddMultiplier(org.bukkit.inventory.ItemStack item, ModifierType type, Skill skill, double value, boolean lore) Adds a multiplier to an item, with optional lore.org.bukkit.inventory.ItemStackaddRequirement(org.bukkit.inventory.ItemStack item, ModifierType type, Skill skill, int level, boolean lore) Adds a skill requirement to use an item, with optional lore.getModifiers(org.bukkit.inventory.ItemStack item, ModifierType type) Gets a list of stat modifiers on an item for a given modifier type.getMultipliers(org.bukkit.inventory.ItemStack item, ModifierType type) Gets a list of skill multipliers on an item for a given modifier type.getRequirements(org.bukkit.inventory.ItemStack item, ModifierType type) Gets the skill requirements for an item.org.bukkit.inventory.ItemStackremoveModifier(org.bukkit.inventory.ItemStack item, ModifierType type, Stat stat) Removes a modifier from an item for a given modifier type and stat.org.bukkit.inventory.ItemStackremoveMultiplier(org.bukkit.inventory.ItemStack item, ModifierType type, Skill skill) Removes a multiplier from an item for the given skill.org.bukkit.inventory.ItemStackremoveRequirement(org.bukkit.inventory.ItemStack item, ModifierType type, Skill skill) Removes a skill requirement from an item.
-
Method Details
-
addModifier
org.bukkit.inventory.ItemStack addModifier(org.bukkit.inventory.ItemStack item, ModifierType type, Stat stat, double value, boolean lore) Adds a modifier to an item, with optional lore. This does not change the item passed in directly, you must use the returned ItemStack. This means the original ItemStack passed in is not changed at all, a new one is created.- Parameters:
item- the original item, will not be changed by the methodtype- theModifierTypeto addstat- the stat to add (UseStatsenum for default stats)value- the value of the stat to addlore- whether to add lore- Returns:
- a new ItemStack with the modifier
-
getModifiers
Gets a list of stat modifiers on an item for a given modifier type.- Parameters:
item- the item to get the modifiers oftype- the modifier type- Returns:
- a list of modifiers
-
removeModifier
org.bukkit.inventory.ItemStack removeModifier(org.bukkit.inventory.ItemStack item, ModifierType type, Stat stat) Removes a modifier from an item for a given modifier type and stat. Does not modify the ItemStack passed in, instead returns a copy of the item with the modifier removed. Will not remove any lore.- Parameters:
item- The item to remove the modifier from. Does not get modified.type- the modifier typestat- the stat of the modifier to remove- Returns:
- the item with the modifier removed
-
addMultiplier
org.bukkit.inventory.ItemStack addMultiplier(org.bukkit.inventory.ItemStack item, ModifierType type, Skill skill, double value, boolean lore) Adds a multiplier to an item, with optional lore. This does not change the item passed in directly, you must use the returned ItemStack. This means the original ItemStack passed in is not changed at all, a new one is created.- Parameters:
item- the original item, will not be changed by the methodtype- theModifierTypeto addskill- the skill to add (UseSkillsenum for default skills)value- the value of the multiplier (in percentage points) to addlore- whether to add lore- Returns:
- a new ItemStack with the multiplier
-
getMultipliers
Gets a list of skill multipliers on an item for a given modifier type.- Parameters:
item- the item to get the multipliers oftype- the modifier type- Returns:
- a list of multipliers
-
removeMultiplier
org.bukkit.inventory.ItemStack removeMultiplier(org.bukkit.inventory.ItemStack item, ModifierType type, Skill skill) Removes a multiplier from an item for the given skill. Does not modify the item, instead returns a copy with the multiplier removed. Will not remove any lore.- Parameters:
item- item to remove the multiplier fromtype- the type of modifierskill- the skill of the multiplier to remove, or null for global multipliers- Returns:
- the modified item with the multiplier removed
-
addRequirement
org.bukkit.inventory.ItemStack addRequirement(org.bukkit.inventory.ItemStack item, ModifierType type, Skill skill, int level, boolean lore) Adds a skill requirement to use an item, with optional lore. This does not change the item passed in directly, you must use the returned ItemStack. This means the original ItemStack passed in is not changed at all, a new one is created.- Parameters:
item- the original item, will not be changed by the methodtype- theModifierTypeto addskill- the skill the requirement is for (UseSkillsenum for default skills)level- the skill level required to use the itemlore- whether to add lore- Returns:
- a new ItemStack with the requirement
-
getRequirements
Gets the skill requirements for an item.- Parameters:
item- the item to get the requirements oftype- the modifier type- Returns:
- a map of skill requirements, where the key is the skill and the level requirements is the value
-
removeRequirement
org.bukkit.inventory.ItemStack removeRequirement(org.bukkit.inventory.ItemStack item, ModifierType type, Skill skill) Removes a skill requirement from an item. Does not modify the item, instead returns a copy of the item with the requirement removed. Does not modify lore.- Parameters:
item- the item to remove the requirement fromtype- the modifier typeskill- the skill of the requirement to remove- Returns:
- the modified item with the requirement removed
-