Class ItemWrapper

java.lang.Object
de.studiocode.invui.item.ItemWrapper
All Implemented Interfaces:
ItemProvider, Cloneable, Supplier<org.bukkit.inventory.ItemStack>

public class ItemWrapper extends Object implements ItemProvider
An ItemProvider that just returns the ItemStack passed to it in the constructor regardless of the players uuid.
  • Constructor Details

    • ItemWrapper

      public ItemWrapper(org.bukkit.inventory.ItemStack itemStack)
  • Method Details

    • get

      public org.bukkit.inventory.ItemStack get()
      Description copied from interface: ItemProvider
      Builds the ItemStack
      Specified by:
      get in interface ItemProvider
      Specified by:
      get in interface Supplier<org.bukkit.inventory.ItemStack>
      Returns:
      The ItemStack
    • getFor

      public org.bukkit.inventory.ItemStack getFor(@NotNull @NotNull UUID playerUUID)
      Description copied from interface: ItemProvider
      Gets the ItemStack for a specific player. This is the method called by BaseWindow which gives you the option to (for example) create a subclass of ItemProvider that automatically translates the item's name into the player's language.
      Specified by:
      getFor in interface ItemProvider
      Parameters:
      playerUUID - The UUID of the Player for whom this ItemStack should be made.
      Returns:
      The ItemStack
    • clone

      public ItemWrapper clone()
      Overrides:
      clone in class Object