src/main/java/de/dosmike/sponge/megamenus/api/elements/PositionProvider.java
static PositionProvider Columns(int firstRow, int lastRow) {
        assert firstRow <= lastRow : "firstRow can not exceed lastRow";
        return previous -> {
            if (previous == null) return new SlotPos(0,0);
            int x = previous.getX();
            int y = previous.getY()+1;
            if (y >= lastRow) {
                y = firstRow;
                if (++x == 9)
                    x = 0;
            }
            return new SlotPos(x,y);
        };
    }
/**
     * This Position Provider returns the {@link SlotPos} at the next inventory row or,
     * if lastRow was reached a SlotPos at the next columns firstRow.
     * The fill order is Top-to-Bottom; Left-to-Right.
     * After the 9th column was filled it will wrap back to the first column.
     * @param firstRow the inclusive first column to reset to, if the row is full
     * @param lastRow the exclusive last column, that determines when the row is full
     * @return a {@link PositionProvider} that fills rows
     */
This Position Provider returns the  SlotPos at the next inventory row or,
if lastRow was reached a SlotPos at the next columns firstRow.
The fill order is Top-to-Bottom; Left-to-Right.
After the 9th column was filled it will wrap back to the first column.
@param firstRow the inclusive first column to reset to, if the row is full
@param lastRow the exclusive last column, that determines when the row is full
@return a  PositionProvider that fills rows
This Position Provider returns the SlotPos at the next inventory row or if lastRow was reached a SlotPos at the next columns firstRow . The fill order is Top - to - Bottom ; Left - to - Right . After the 9th column was filled it will wrap back to the first column . @param firstRow the inclusive first column to reset to if the row is full @param lastRow the exclusive last column that determines when the row is full @return a PositionProvider that fills rows
static PositionProvider Columns(int firstRow, int lastRow) {
        assert firstRow <= lastRow : "firstRow can not exceed lastRow";
        return previous -> {
            if (previous == null) return new SlotPos(0,0);
            int x = previous.getX();
            int y = previous.getY()+1;
            if (y >= lastRow) {
                y = firstRow;
                if (++x == 9)
                    x = 0;
            }
            return new SlotPos(x,y);
        };
    }
static PositionProvider Columns ( int firstRow , int lastRow ) { assert firstRow <= lastRow : "firstRow can not exceed lastRow" ; return previous -> { if ( previous == null ) return new SlotPos ( 0 , 0 ) ; int x = previous . getX ( ) ; int y = previous . getY ( ) + 1 ; if ( y >= lastRow ) { y = firstRow ; if ( ++ x == 9 ) x = 0 ; } return new SlotPos ( x , y ) ; } ; }
This Position Provider returns the {@link SlotPos} at the next inventory row or,
 if lastRow was reached a SlotPos at the next columns firstRow.
This Position Provider returns the { @link SlotPos } at the next inventory row or if lastRow was reached a SlotPos at the next columns firstRow .