Package org.geysermc.geyser.inventory
Class PlayerInventory
java.lang.Object
org.geysermc.geyser.inventory.Inventory
org.geysermc.geyser.inventory.PlayerInventory
-
Field Summary
Fields inherited from class org.geysermc.geyser.inventory.Inventory
containerType, holderId, holderPosition, items, javaId, size, title -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NonNull GeyserItemStackintStores the held item slot, starting at index 0.getItemInHand(@NonNull com.github.steveice10.mc.protocol.data.game.entity.player.Hand hand)intgetOffsetForHotbar(@org.jetbrains.annotations.Range(from=0L, to=8L) int slot)voidsetCursor(@NonNull GeyserItemStack newCursor, GeyserSession session)voidsetHeldItemSlot(int heldItemSlot)Stores the held item slot, starting at index 0.voidsetItemInHand(@NonNull GeyserItemStack item)Methods inherited from class org.geysermc.geyser.inventory.Inventory
getBedrockId, getContainerType, getHolderId, getHolderPosition, getItem, getJavaId, getNextStateId, getSize, getStateId, getTitle, incrementStateId, isDisplayed, isPending, resetNextStateId, setDisplayed, setHolderId, setHolderPosition, setItem, setPending, setStateId, toString, updateItemNetId
-
Constructor Details
-
PlayerInventory
public PlayerInventory()
-
-
Method Details
-
getOffsetForHotbar
public int getOffsetForHotbar(@org.jetbrains.annotations.Range(from=0L, to=8L) int slot)- Specified by:
getOffsetForHotbarin classInventory
-
setCursor
-
getItemInHand
public GeyserItemStack getItemInHand(@NonNull com.github.steveice10.mc.protocol.data.game.entity.player.Hand hand) -
getItemInHand
-
setItemInHand
-
getOffhand
-
getHeldItemSlot
public int getHeldItemSlot()Stores the held item slot, starting at index 0. Add 36 in order to get the network item slot. -
setHeldItemSlot
public void setHeldItemSlot(int heldItemSlot)Stores the held item slot, starting at index 0. Add 36 in order to get the network item slot. -
getCursor
-