java.lang.Object
com.github.imdabigboss.easydatapack.api.utils.ItemsUtil

public class ItemsUtil extends Object
Some utilities for items.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    isItemArmor​(@NonNull org.bukkit.inventory.ItemStack item)
    Checks if an item is a piece of armor
    static boolean
    isItemASword​(@NonNull org.bukkit.inventory.ItemStack item)
    Checks if an item is a sword
    static boolean
    isItemATool​(@NonNull org.bukkit.inventory.ItemStack item)
    Checks if an item is a tool

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ItemsUtil

      public ItemsUtil()
  • Method Details

    • isItemATool

      public static boolean isItemATool(@NonNull org.bukkit.inventory.ItemStack item)
      Checks if an item is a tool
      Parameters:
      item - the item to check
      Returns:
      true if the item is a tool, false otherwise
    • isItemASword

      public static boolean isItemASword(@NonNull org.bukkit.inventory.ItemStack item)
      Checks if an item is a sword
      Parameters:
      item - the item to check
      Returns:
      true if the item is a sword, false otherwise
    • isItemArmor

      public static boolean isItemArmor(@NonNull org.bukkit.inventory.ItemStack item)
      Checks if an item is a piece of armor
      Parameters:
      item - the item to check
      Returns:
      true if the item is a piece of armor, false otherwise