Package studio.magemonkey.fabled.data
Class PlayerEquips
java.lang.Object
studio.magemonkey.fabled.data.PlayerEquips
Handles keeping track of and applying attribute
 bonuses and requirements for items.
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassRepresents one available item's datastatic enum - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleancanBlock()booleancanHit()getEquipData(org.bukkit.inventory.ItemStack item, PlayerEquips.EquipType type) booleanupdate(org.bukkit.entity.Player player) Updates all available items for the playerbooleanupdateEquip(org.bukkit.entity.Player player, int slot, org.bukkit.inventory.ItemStack item) Update equips for certain slot, handling any requirements and attributebooleanupdateHandHeldItem(org.bukkit.entity.Player player, org.bukkit.inventory.ItemStack item) Update item for hand held item, handling any requirements and attribute 
- 
Constructor Details
- 
PlayerEquips
- Parameters:
 player- player data reference
 
 - 
 - 
Method Details
- 
canHit
public boolean canHit()- Returns:
 - true if the player can hit something, false otherwise
 
 - 
canBlock
public boolean canBlock() - 
update
public boolean update(org.bukkit.entity.Player player) Updates all available items for the player- Returns:
 - true if the equip data is being changed
 call 
PlayerData.updatePlayerStat(Player)to update player stats 
 - 
updateHandHeldItem
public boolean updateHandHeldItem(org.bukkit.entity.Player player, org.bukkit.inventory.ItemStack item) Update item for hand held item, handling any requirements and attribute- Parameters:
 player- the player referenceitem- the new item
 - 
updateEquip
public boolean updateEquip(org.bukkit.entity.Player player, int slot, org.bukkit.inventory.ItemStack item) Update equips for certain slot, handling any requirements and attribute- Parameters:
 player- the player referenceslot- related indexitem- the new item- Returns:
 - true if the equip data is being changed
 call 
PlayerData.updatePlayerStat(Player)to update player stats 
 - 
getEquipData
public PlayerEquips.EquipData getEquipData(org.bukkit.inventory.ItemStack item, PlayerEquips.EquipType type)  
 -