Class StackUtils
java.lang.Object
io.github.sefiraat.networks.utils.StackUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanQuickEscapeMetaVariant(ItemMeta metaOne, ItemMeta metaTwo) static ItemStackgetAsQuantity(ItemStack itemStack, int amount) static booleanisOnCooldown(ItemStack itemStack) Heal the entity by the provided amountstatic booleanitemsMatch(ItemStackCache cache, ItemStack itemStack, boolean checkLore) Checks if items match each other, checks go in order from lightest to heavieststatic booleanitemsMatch(ItemStack itemStack1, ItemStack itemStack2) static voidputOnCooldown(ItemStack itemStack, int durationInSeconds) Heal the entity by the provided amount
-
Constructor Details
-
StackUtils
public StackUtils()
-
-
Method Details
-
getAsQuantity
-
itemsMatch
-
itemsMatch
public static boolean itemsMatch(@Nonnull ItemStackCache cache, @Nullable ItemStack itemStack, boolean checkLore) Checks if items match each other, checks go in order from lightest to heaviest -
canQuickEscapeMetaVariant
-
putOnCooldown
@ParametersAreNonnullByDefault public static void putOnCooldown(ItemStack itemStack, int durationInSeconds) Heal the entity by the provided amount- Parameters:
itemStack- TheLivingEntityto healdurationInSeconds- The amount to heal by
-
isOnCooldown
Heal the entity by the provided amount- Parameters:
itemStack- TheLivingEntityto heal
-