Class Grave
java.lang.Object
com.haven.havenplugin.graves.Grave
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonglonggetId()org.bukkit.inventory.ItemStackgetItem(int slot) org.bukkit.inventory.ItemStack[]getItems()org.bukkit.Locationintstatic intgraveToGui(int graveSlot) static intguiToGrave(int guiSlot) Converts a GUI inventory slot index to an internal grave slot index.booleanisEmpty()Returns true if every item slot in this grave is null or air.static booleanisFillerSlot(int guiSlot) Returns true if the given GUI slot is a filler (always locked).booleanisLocked()intCounts non-null, non-air items.voidsetExpiresAt(long expiresAt) voidsetItem(int slot, org.bukkit.inventory.ItemStack item) voidsetLocked(boolean locked) voidsetTotalXp(int xp) booleanwasWater()
-
Field Details
-
SLOT_COUNT
public static final int SLOT_COUNT- See Also:
-
-
Constructor Details
-
Grave
-
-
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
-
getOwnerId
-
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)
-