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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
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.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.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.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.tnemc.item.providers.ItemProvider
componentsEqual, componentsEqual, componentsEqual, locale, similar
-
Constructor Details
-
ItemAdderProvider
public ItemAdderProvider()
-
-
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 interfaceItemProvider<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 interfaceItemProvider<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 interfaceItemProvider<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
- Specified by:
identifier
in interfaceIdentifiable
- Returns:
- the identifier for this check.
-