Class ItemAdderProvider

java.lang.Object
net.tnemc.item.bukkitbase.platform.providers.ItemAdderProvider
All Implemented Interfaces:
Identifiable, ItemProvider<org.bukkit.inventory.ItemStack>

public class ItemAdderProvider extends Object implements ItemProvider<org.bukkit.inventory.ItemStack>
ItemAdderProvider
Since:
0.2.0.0
Author:
creatorfromhell
  • Constructor Details

  • Method Details

    • appliesTo

      public boolean appliesTo(AbstractItemStack<? extends org.bukkit.inventory.ItemStack> serialized, org.bukkit.inventory.ItemStack item)
      Checks if the given serialized item stack applies to the specified item.
      Specified by:
      appliesTo in interface ItemProvider<org.bukkit.inventory.ItemStack>
      Parameters:
      serialized - The serialized item stack to check against the item.
      item - The item to check against.
      Returns:
      True if the serialized item stack applies to the item, false otherwise.
    • similar

      public boolean similar(AbstractItemStack<? extends org.bukkit.inventory.ItemStack> original, org.bukkit.inventory.ItemStack compare)
      Checks if the provided item stack is similar to the original item stack.
      Specified by:
      similar in interface ItemProvider<org.bukkit.inventory.ItemStack>
      Parameters:
      original - The original item stack to compare against.
      compare - The item stack to compare.
      Returns:
      True if the two item stacks are similar, otherwise false.
    • locale

      public org.bukkit.inventory.ItemStack locale(AbstractItemStack<? extends org.bukkit.inventory.ItemStack> original, int amount)
      Creates a copy of the original item stack with a specified amount.
      Specified by:
      locale in interface ItemProvider<org.bukkit.inventory.ItemStack>
      Parameters:
      original - The original item stack to copy.
      amount - The amount for the new item stack.
      Returns:
      A new item stack with the specified amount.
    • identifier

      public String identifier()
      Specified by:
      identifier in interface Identifiable
      Returns:
      the identifier for this check.