Class CustomGenerator<T extends PackAsset>

    • Constructor Summary

      Constructors 
      Constructor Description
      CustomGenerator​(java.lang.String name)  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract @NotNull CommandAction generateCreateAction​(java.lang.String name, java.util.function.Consumer<T> createAction)
      This method is called when the user clicks on the icon to create a new asset from the generator.
      abstract @NotNull org.bukkit.inventory.ItemStack getIcon()
      This method is called when the gui is opened to create a new asset from a generator.
      • Methods inherited from class dev.linwood.itemmods.pack.asset.PackAsset

        save
      • Methods inherited from class java.lang.Object

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

      • CustomGenerator

        public CustomGenerator​(java.lang.String name)
    • Method Detail

      • generateCreateAction

        @NotNull
        public abstract @NotNull CommandAction generateCreateAction​(java.lang.String name,
                                                                    java.util.function.Consumer<T> createAction)
        This method is called when the user clicks on the icon to create a new asset from the generator.
        Parameters:
        name - The name of the asset.
        createAction - The action to execute when the asset should be created.
        Returns:
        The action to execute when the asset should be created.
      • getIcon

        @NotNull
        public abstract @NotNull org.bukkit.inventory.ItemStack getIcon()
        This method is called when the gui is opened to create a new asset from a generator.
        Returns:
        The ItemStack to display the generator in the gui.