Class BukkitDamageComponent

java.lang.Object
net.tnemc.item.component.impl.DamageComponent<BukkitItemStack,org.bukkit.inventory.ItemStack>
net.tnemc.item.bukkit.platform.impl.BukkitDamageComponent
All Implemented Interfaces:
SerialComponent<BukkitItemStack,org.bukkit.inventory.ItemStack>, ItemApplicator<BukkitItemStack,org.bukkit.inventory.ItemStack>, ItemCheck<org.bukkit.inventory.ItemStack>, Identifiable, ItemSerializer<BukkitItemStack,org.bukkit.inventory.ItemStack>

public class BukkitDamageComponent extends DamageComponent<BukkitItemStack,org.bukkit.inventory.ItemStack>
BukkitDamageComponent
Since:
0.2.0.0
Author:
creatorfromhell
  • Constructor Details

    • BukkitDamageComponent

      Represents a component that manages damage information. This component stores and provides methods for handling damage values.
      Since:
      0.2.0.0
    • BukkitDamageComponent

      public BukkitDamageComponent(int damage)
      Constructs a new DamageComponent with the specified damage amount.
      Parameters:
      damage - the amount of damage for the component
      Since:
      0.2.0.0
  • Method Details

    • enabled

      public boolean enabled(String version)
      Parameters:
      version - the version being used when this check is called.
      Returns:
      true if this check is enabled for the version, otherwise false
      Since:
      0.2.0.0
    • apply

      public org.bukkit.inventory.ItemStack apply(BukkitItemStack serialized, org.bukkit.inventory.ItemStack item)
      Parameters:
      serialized - the serialized item stack to use
      item - the item that we should use to apply this applicator to.
      Returns:
      the updated item.
      Since:
      0.2.0.0
    • serialize

      public BukkitItemStack serialize(org.bukkit.inventory.ItemStack item, BukkitItemStack serialized)
      Parameters:
      item - the item that we should use to deserialize.
      serialized - the serialized item stack we should use to apply this deserializer to
      Returns:
      the updated serialized item.
      Since:
      0.2.0.0
    • appliesTo

      public boolean appliesTo(org.bukkit.inventory.ItemStack item)
      Checks if this component applies to the specified item.
      Parameters:
      item - The item to check against.
      Returns:
      True if this component applies to the item, false otherwise.
      Since:
      0.2.0.0