Sword API
Overview
The sword system manages player weapon progression through various skins, tiers, and upgrades. It handles the creation and validation of sword items with custom properties, damage values, and visual appearances.
Sword Item Management
Item Retrieval
ItemStack getSwordItemFromPlayer(Player player)
Description: Gets the current sword item for a player based on their progression
Parameters:
player- Target playerReturns: ItemStack representing the player's current sword
Usage: Equipment updates, inventory management, display purposes
Item Validation
boolean isItemSword(ItemStack item)
Description: Checks if an ItemStack is a valid EdDungeons sword
Parameters:
item- ItemStack to validateReturns: True if the item is an EdDungeons sword, false otherwise
Usage: Event handling, inventory filtering, item validation
Get Sword Damage From Player
BigDecimal getPlayerSwordDamage(ItemStack item)
Description: Gets the damage from the player's sword in their inventory.
Parameters:
item- The sword itemstack.Returns: The damage. Will return BigDecimal.ZERO if the player has no sword.
Last updated