Package com.ranull.graves.manager
Class ItemStackManager
java.lang.Object
com.ranull.graves.manager.EntityDataManager
com.ranull.graves.manager.ItemStackManager
Manages the creation and manipulation of ItemStacks related to graves.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionItemStackManager
(Graves plugin) Initializes a new instance of the ItemStackManager class. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.inventory.ItemStack
createGraveListItemStack
(int number, Grave grave) Creates an ItemStack representing a grave in a list.org.bukkit.inventory.ItemStack
createGraveMenuItemStack
(int slot, Grave grave) Creates an ItemStack for a grave menu slot.org.bukkit.inventory.ItemStack
getGraveHead
(Grave grave) Creates an ItemStack representing the head of a grave owner.org.bukkit.inventory.ItemStack
getGraveObituary
(Grave grave) Creates an ItemStack representing the obituary of a grave.splitIntoPages
(List<String> lines, int maxLinesPerPage) Splits a list of strings into sublists, each containing up to maxLinesPerPage lines.Methods inherited from class com.ranull.graves.manager.EntityDataManager
createEntityData, createEntityData, getEntityData, getEntityDataMap, getGrave, getGrave, getLoadedEntityDataList, removeEntityData, removeEntityData
-
Field Details
-
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
Initializes a new instance of the ItemStackManager class.- Parameters:
plugin
- The plugin instance.
-
-
Method Details
-
getGraveObituary
Creates an ItemStack representing the obituary of a grave.- Parameters:
grave
- The grave to create an obituary for.- Returns:
- The created ItemStack.
-
splitIntoPages
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
Creates an ItemStack representing the head of a grave owner.- Parameters:
grave
- The grave to create a head for.- Returns:
- The created ItemStack.
-
createGraveListItemStack
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
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.
-