Class CustomToolItem
java.lang.Object
com.github.imdabigboss.easydatapack.api.items.CustomItem
com.github.imdabigboss.easydatapack.api.items.CustomToolItem
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis class represents a builder for a custom tool item.Nested classes/interfaces inherited from class com.github.imdabigboss.easydatapack.api.items.CustomItem
CustomItem.AttributeInformation, CustomItem.EnchantmentInformation -
Field Summary
Fields inherited from class com.github.imdabigboss.easydatapack.api.items.CustomItem
itemStack -
Method Summary
Modifier and TypeMethodDescriptionstatic voidformatToolPropertiesLore(org.bukkit.inventory.ItemStack itemStack, CustomToolItem customItem)doubleGets the attack damage that the tool deals.doubleGets the attack speed of the tool.@Nullable Consumer<org.bukkit.event.block.BlockBreakEvent>Gets the event that is called when a player breaks a block with the tool.@Nullable Consumer<org.bukkit.event.entity.EntityDamageByEntityEvent>Gets the event that is called when a player hits an entity with the tool.Methods inherited from class com.github.imdabigboss.easydatapack.api.items.CustomItem
canEnchant, getAllowedEnchantments, getAttributeModifiers, getBaseMaterial, getCustomModelData, getEnchantments, getEventListener, getForbiddenEnchantments, getItemStack, getItemUseEvent, getLore, getName, getNamespacedKey, getNamespaceKey, isHideFlags, isNewItem, isUnbreakable
-
Method Details
-
getAttackDamage
public double getAttackDamage()Gets the attack damage that the tool deals.- Returns:
- the attack damage that the tool deals
-
getAttackSpeed
public double getAttackSpeed()Gets the attack speed of the tool.- Returns:
- the attack speed of the tool
-
getPlayerHitEntityEvent
@Nullable public @Nullable Consumer<org.bukkit.event.entity.EntityDamageByEntityEvent> getPlayerHitEntityEvent()Gets the event that is called when a player hits an entity with the tool.- Returns:
- the event that is called when a player hits an entity with the tool
-
getPlayerBreakBlockEvent
@Nullable public @Nullable Consumer<org.bukkit.event.block.BlockBreakEvent> getPlayerBreakBlockEvent()Gets the event that is called when a player breaks a block with the tool.- Returns:
- the event that is called when a player breaks a block with the tool
-
formatToolPropertiesLore
public static void formatToolPropertiesLore(org.bukkit.inventory.ItemStack itemStack, CustomToolItem customItem)
-