Class BukkitAttributeModifiersComponent
java.lang.Object
net.tnemc.item.component.impl.AttributeModifiersComponent<BukkitItemStack,org.bukkit.inventory.ItemStack>
net.tnemc.item.bukkit.platform.impl.BukkitAttributeModifiersComponent
- 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 BukkitAttributeModifiersComponent
extends AttributeModifiersComponent<BukkitItemStack,org.bukkit.inventory.ItemStack>
BukkitAttributeModifiersComponent
- Since:
- 0.2.0.0
- Author:
- creatorfromhell
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for AttributeModifiersComponent.BukkitAttributeModifiersComponent(List<AttributeModifier> modifiers) Constructor for AttributeModifiersComponent. -
Method Summary
Modifier and TypeMethodDescriptionbooleanappliesTo(org.bukkit.inventory.ItemStack item) Checks if this component applies to the specified item.org.bukkit.inventory.ItemStackapply(BukkitItemStack serialized, org.bukkit.inventory.ItemStack item) booleanserialize(org.bukkit.inventory.ItemStack item, BukkitItemStack serialized) Methods inherited from class net.tnemc.item.component.impl.AttributeModifiersComponent
hashCode, identifier, modifiers, modifiers, modifiers, modifiers, readJSON, similar, toJSONMethods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.tnemc.item.component.SerialComponent
applies, check
-
Constructor Details
-
BukkitAttributeModifiersComponent
public BukkitAttributeModifiersComponent()Constructor for AttributeModifiersComponent. Initializes an empty list of AttributeModifiers.- Since:
- 0.2.0.0
-
BukkitAttributeModifiersComponent
Constructor for AttributeModifiersComponent. Initializes the component with a list of AttributeModifiers and a boolean flag to show in tooltip.- Parameters:
modifiers- The list of AttributeModifiers to associate with this component.- Since:
- 0.2.0.0
-
-
Method Details
-
enabled
- 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 useitem- the item that we should use to apply this applicator to.- Returns:
- the updated item.
- Since:
- 0.2.0.0
-
serialize
- 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
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
-