Class ItemStackManager

java.lang.Object
com.ranull.graves.manager.EntityDataManager
com.ranull.graves.manager.ItemStackManager

public final class ItemStackManager extends EntityDataManager
Manages the creation and manipulation of ItemStacks related to graves.
  • Field Details

    • plugin

      private final Graves plugin
      The main plugin instance associated with Graves.

      This Graves instance represents the core plugin that this Graves is part of. It provides access to the plugin's functionality, configuration, and other services.

    • e

      private org.bukkit.entity.Entity e
  • Constructor Details

    • ItemStackManager

      public ItemStackManager(Graves plugin)
      Initializes a new instance of the ItemStackManager class.
      Parameters:
      plugin - The plugin instance.
  • Method Details

    • getGraveObituary

      public org.bukkit.inventory.ItemStack getGraveObituary(Grave grave)
      Creates an ItemStack representing the obituary of a grave.
      Parameters:
      grave - The grave to create an obituary for.
      Returns:
      The created ItemStack.
    • splitIntoPages

      private List<List<String>> splitIntoPages(List<String> lines, int maxLinesPerPage)
      Splits a list of strings into sublists, each containing up to maxLinesPerPage lines.
      Parameters:
      lines - The list of strings to split.
      maxLinesPerPage - The maximum number of lines per page.
      Returns:
      A list of pages, where each page is a list of strings.
    • getGraveHead

      public org.bukkit.inventory.ItemStack getGraveHead(Grave grave)
      Creates an ItemStack representing the head of a grave owner.
      Parameters:
      grave - The grave to create a head for.
      Returns:
      The created ItemStack.
    • createGraveListItemStack

      public org.bukkit.inventory.ItemStack createGraveListItemStack(int number, Grave grave)
      Creates an ItemStack representing a grave in a list.
      Parameters:
      number - The number to display on the item.
      grave - The grave to create the ItemStack for.
      Returns:
      The created ItemStack.
    • createGraveMenuItemStack

      public org.bukkit.inventory.ItemStack createGraveMenuItemStack(int slot, Grave grave)
      Creates an ItemStack for a grave menu slot.
      Parameters:
      slot - The slot number.
      grave - The grave to create the ItemStack for.
      Returns:
      The created ItemStack.