Class ActionItem


  • public class ActionItem
    extends Item
    This class represent an Item who do something when clicked in inventory
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      @NotNull ActionItem amount​(int amount)
      Set the amount in the ItemStack
      ActionItem click​(Click click)
      Set the action performed when clicking on this item
      static @NotNull ActionItem create​(@NotNull org.bukkit.inventory.ItemStack stack)
      Static method for create a new item (better readability) This method is just calling ActionItem(ItemStack)
      static @NotNull ActionItem create​(@NotNull org.bukkit.Material material)
      Static method for create a new item (better readability) This method is just calling ActionItem(Material)
      @NotNull ActionItem flag​(@NotNull org.bukkit.inventory.ItemFlag... flags)
      Set the flags of this item
      @NotNull ActionItem lore​(@NotNull java.lang.String... lores)
      Set the lore of the item
      @NotNull ActionItem material​(@NotNull org.bukkit.Material material)
      Set the material of this item
      @NotNull ActionItem name​(@NotNull java.lang.String name)
      Set the name of the item
      @NotNull ActionItem stack​(@NotNull org.bukkit.inventory.ItemStack stack)
      Set the itemstack of the item
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • create

        @NotNull
        public static @NotNull ActionItem create​(@NotNull
                                                 @NotNull org.bukkit.Material material)
        Static method for create a new item (better readability) This method is just calling ActionItem(Material)
        Parameters:
        material - The material of this item
        Returns:
        The ActionItem instance created
      • create

        @NotNull
        public static @NotNull ActionItem create​(@NotNull
                                                 @NotNull org.bukkit.inventory.ItemStack stack)
        Static method for create a new item (better readability) This method is just calling ActionItem(ItemStack)
        Parameters:
        stack - The ItemStack of this item
        Returns:
        The ActionItem instance created
      • material

        @NotNull
        public @NotNull ActionItem material​(@NotNull
                                            @NotNull org.bukkit.Material material)
        Set the material of this item
        Overrides:
        material in class Item
        Parameters:
        material - Material of this item
        Returns:
        Current instance
      • amount

        @NotNull
        public @NotNull ActionItem amount​(int amount)
        Set the amount in the ItemStack
        Overrides:
        amount in class Item
        Parameters:
        amount - Amount of this item
        Returns:
        Current instance
      • name

        @NotNull
        public @NotNull ActionItem name​(@NotNull
                                        @NotNull java.lang.String name)
        Set the name of the item
        Overrides:
        name in class Item
        Parameters:
        name - Name of the item
        Returns:
        Current instance
      • lore

        @NotNull
        public @NotNull ActionItem lore​(@NotNull
                                        @NotNull java.lang.String... lores)
        Set the lore of the item
        Overrides:
        lore in class Item
        Parameters:
        lores - Lore of the item
        Returns:
        Current instance
      • flag

        @NotNull
        public @NotNull ActionItem flag​(@NotNull
                                        @NotNull org.bukkit.inventory.ItemFlag... flags)
        Set the flags of this item
        Overrides:
        flag in class Item
        Parameters:
        flags - Flags to add
        Returns:
        Current instance
      • stack

        @NotNull
        public @NotNull ActionItem stack​(@NotNull
                                         @NotNull org.bukkit.inventory.ItemStack stack)
        Set the itemstack of the item
        Overrides:
        stack in class Item
        Parameters:
        stack - Itemstack wanted
        Returns:
        Current instance
      • click

        public ActionItem click​(Click click)
        Set the action performed when clicking on this item
        Parameters:
        click - Action to perform
        Returns:
        Current instance