Class PlayerEquips

java.lang.Object
studio.magemonkey.fabled.data.PlayerEquips

public class PlayerEquips extends Object
Handles keeping track of and applying attribute bonuses and requirements for items.
  • Constructor Details

    • PlayerEquips

      public PlayerEquips(PlayerData player)
      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 reference
      item - 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 reference
      slot - related index
      item - 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)