Class GraveList

java.lang.Object
com.ranull.graves.inventory.GraveList
All Implemented Interfaces:
org.bukkit.inventory.InventoryHolder

public class GraveList extends Object implements org.bukkit.inventory.InventoryHolder
Represents a list of graves that can be displayed in an inventory. Implements InventoryHolder to manage inventory display.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final List<Grave>
     
    private org.bukkit.inventory.Inventory
     
    private final UUID
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    GraveList(UUID uuid, List<Grave> graveList)
    Constructs a new GraveList instance with the given UUID and list of graves.
  • Method Summary

    Modifier and Type
    Method
    Description
    getGrave(int slot)
    Gets the Grave object at the specified slot in the grave list.
    @NotNull org.bukkit.inventory.Inventory
    Gets the inventory associated with this GraveList.
    Gets the UUID associated with this GraveList.
    void
    setInventory(org.bukkit.inventory.Inventory inventory)
    Sets the inventory for this GraveList.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • uuid

      private final UUID uuid
    • graveList

      private final List<Grave> graveList
    • inventory

      private org.bukkit.inventory.Inventory inventory
  • Constructor Details

    • GraveList

      public GraveList(UUID uuid, List<Grave> graveList)
      Constructs a new GraveList instance with the given UUID and list of graves.
      Parameters:
      uuid - The UUID associated with this GraveList.
      graveList - The list of graves to be managed.
  • Method Details

    • getInventory

      @NotNull public @NotNull org.bukkit.inventory.Inventory getInventory()
      Gets the inventory associated with this GraveList.
      Specified by:
      getInventory in interface org.bukkit.inventory.InventoryHolder
      Returns:
      The Inventory object.
    • setInventory

      public void setInventory(org.bukkit.inventory.Inventory inventory)
      Sets the inventory for this GraveList.
      Parameters:
      inventory - The Inventory object to set.
    • getUUID

      public UUID getUUID()
      Gets the UUID associated with this GraveList.
      Returns:
      The UUID.
    • getGrave

      public Grave getGrave(int slot)
      Gets the Grave object at the specified slot in the grave list.
      Parameters:
      slot - The slot index to retrieve the grave from.
      Returns:
      The Grave object at the specified slot, or null if the slot is invalid.