Package de.studiocode.invui.item
Class ItemWrapper
java.lang.Object
de.studiocode.invui.item.ItemWrapper
- All Implemented Interfaces:
ItemProvider,Cloneable,Supplier<org.bukkit.inventory.ItemStack>
An
ItemProvider that just returns the ItemStack
passed to it in the constructor regardless of the players uuid.-
Field Summary
Fields inherited from interface de.studiocode.invui.item.ItemProvider
EMPTY -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ItemWrapper
public ItemWrapper(org.bukkit.inventory.ItemStack itemStack)
-
-
Method Details
-
get
public org.bukkit.inventory.ItemStack get()Description copied from interface:ItemProviderBuilds theItemStack- Specified by:
getin interfaceItemProvider- Specified by:
getin interfaceSupplier<org.bukkit.inventory.ItemStack>- Returns:
- The
ItemStack
-
getFor
Description copied from interface:ItemProviderGets theItemStackfor a specific player. This is the method called byBaseWindowwhich gives you the option to (for example) create a subclass ofItemProviderthat automatically translates the item's name into the player's language.- Specified by:
getForin interfaceItemProvider- Parameters:
playerUUID- TheUUIDof thePlayerfor whom thisItemStackshould be made.- Returns:
- The
ItemStack
-
clone
-