Class Grave

java.lang.Object
com.haven.havenplugin.graves.Grave

public class Grave extends Object
Represents a player grave in the world. Internal slot layout (41 slots total): [0..8] Hotbar [9..35] Main inventory [36] Boots [37] Leggings [38] Chestplate [39] Helmet [40] Offhand GUI layout (5 rows × 9 = 45 slots): Row 0: [0]=Helmet [1]=Chestplate [2]=Leggings [3]=Boots [4]=Filler [5]=Offhand [6-8]=Filler Rows 1-4: [9-35]=Main inventory, [36-44]=Hotbar (mapped from internal slots)
  • Field Details

  • Constructor Details

    • Grave

      public Grave(UUID id, UUID ownerId, String ownerName, org.bukkit.Location location, boolean wasWater, org.bukkit.inventory.ItemStack[] items, int totalXp, long createdAt, long expiresAt)
  • Method Details

    • graveToGui

      public static int graveToGui(int graveSlot)
    • guiToGrave

      public static int guiToGrave(int guiSlot)
      Converts a GUI inventory slot index to an internal grave slot index. Returns -1 for filler slots.
    • isFillerSlot

      public static boolean isFillerSlot(int guiSlot)
      Returns true if the given GUI slot is a filler (always locked).
    • isEmpty

      public boolean isEmpty()
      Returns true if every item slot in this grave is null or air.
    • itemCount

      public int itemCount()
      Counts non-null, non-air items.
    • getId

      public UUID getId()
    • getOwnerId

      public UUID getOwnerId()
    • getOwnerName

      public String getOwnerName()
    • getLocation

      public org.bukkit.Location getLocation()
    • wasWater

      public boolean wasWater()
    • isLocked

      public boolean isLocked()
    • getItems

      public org.bukkit.inventory.ItemStack[] getItems()
    • getTotalXp

      public int getTotalXp()
    • setTotalXp

      public void setTotalXp(int xp)
    • setLocked

      public void setLocked(boolean locked)
    • getCreatedAt

      public long getCreatedAt()
    • getExpiresAt

      public long getExpiresAt()
    • setExpiresAt

      public void setExpiresAt(long expiresAt)
    • getItem

      public org.bukkit.inventory.ItemStack getItem(int slot)
    • setItem

      public void setItem(int slot, org.bukkit.inventory.ItemStack item)