Class SlotUtils
java.lang.Object
io.github.rysefoxx.inventory.plugin.util.SlotUtils
- Since:
- 6/12/2022
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiontoRowAndColumn(int slot) Converts a slot to a row and column.inttoSlot(int row, int column) Convert a row and a column to a slot.
-
Constructor Details
-
SlotUtils
public SlotUtils()
-
-
Method Details
-
toSlot
public int toSlot(int row, int column) Convert a row and a column to a slot.- Parameters:
row- The rowcolumn- The column- Returns:
- The slot
-
toRowAndColumn
Converts a slot to a row and column.- Parameters:
slot- The slot to convert to a row and column- Returns:
- A pair of the row and column. Pair#getLeft() is the row and Pair#getRight() is the column.
-