mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-12-17 22:17:37 +01:00
add inventory access to gui getitem
This commit is contained in:
parent
4b68c6726a
commit
796a24e7e9
@ -221,11 +221,17 @@ public class Gui {
|
||||
}
|
||||
|
||||
public ItemStack getItem(int cell) {
|
||||
if (inventory != null && unlockedCells.getOrDefault(cell, false)) {
|
||||
return inventory.getItem(cell);
|
||||
}
|
||||
return cellItems.get(cell);
|
||||
}
|
||||
|
||||
public ItemStack getItem(int row, int col) {
|
||||
final int cell = col + row * 9;
|
||||
if (inventory != null && unlockedCells.getOrDefault(cell, false)) {
|
||||
return inventory.getItem(cell);
|
||||
}
|
||||
return cellItems.get(cell);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user