No matter what method I have tried, the bottom row of the survival inventory is not readable.
This is my inventory:
Inventory main = player.getInventory().query(MainPlayerInventory.class);
for(int y = 0; y < 4; y++){
for(int x = 0; x < 9; x++){
Optional<Slot> slot = ((MainPlayerInventory) main).getGrid().getSlot(x, y);
if(slot.isPresent()){
System.out.println(slot.get().peek());
}
}
}
This snipped produces the following output:
As you can see, the GridInventory encompasses the hotbar and the top two rows of the survival inventory. Through no method have I been able to read the bottom row, including querying the parent inventory.
Is this (heaven forbid) an intentional feature of Spigot? What am I doing incorrectly, here?