Skip to content

Commit a744a42

Browse files
Remove createPaginated methods.
1 parent 24c53da commit a744a42

File tree

1 file changed

+0
-103
lines changed

1 file changed

+0
-103
lines changed

src/main/java/me/flame/menus/menu/MenuFactory.java

Lines changed: 0 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -105,109 +105,6 @@ public final class MenuFactory {
105105
return new Menu(rows, title, modifiers, true);
106106
}
107107

108-
/**
109-
* Create a new regular Menu with the provided title and rows.
110-
* <p>
111-
* This also creates a simple hash set of modifiers which by default is empty.
112-
* <p>
113-
* A good example of creation using a method like this:
114-
* <pre>{@code
115-
* var plugin = ...;
116-
* Menu menu = Menus.getFactory().createPaginated("Title", 3);
117-
* }</pre>
118-
* @param title the title to name the menu
119-
* @param rows the rows to add to the menu
120-
* @return a new Menu with the provided rows and title.
121-
*/
122-
@Contract("_, _ -> new")
123-
public @NotNull PaginatedMenu createPaginated(@NonNull String title, int rows) {
124-
checkRows(rows);
125-
return new PaginatedMenu(rows, 1, title, EnumSet.noneOf(Modifier.class));
126-
}
127-
128-
/**
129-
* Create a new regular Menu with the provided title and rows.
130-
* <p>
131-
* This also creates a simple hash set of modifiers which by default is empty.
132-
* <p>
133-
* A good example of creation using a method like this:
134-
* <pre>{@code
135-
* var plugin = ...;
136-
* Menu menu = Menus.getFactory().createPaginated("Title", 3, ...);
137-
* }</pre>
138-
* @param title the title to name the menu
139-
* @param rows the rows to add to the menu
140-
* @return a new Menu with the provided rows and title.
141-
*/
142-
@Contract("_, _, _ -> new")
143-
public @NotNull PaginatedMenu createPaginated(@NonNull String title, int rows, int pageSize) {
144-
checkRows(rows);
145-
return new PaginatedMenu(rows, pageSize, title, EnumSet.noneOf(Modifier.class));
146-
}
147-
148-
/**
149-
* Create a new regular Menu with the provided title and rows.
150-
* <p>
151-
* This also creates a simple hash set of modifiers which by default is empty.
152-
* <p>
153-
* A good example of creation using a method like this:
154-
* <pre>{@code
155-
* var plugin = ...;
156-
* Menu menu = Menus.getFactory().createPaginated("Title", 3, ..., true);
157-
* }</pre>
158-
* @param title the title to name the menu
159-
* @param rows the rows to add to the menu
160-
* @return a new Menu with the provided rows and title.
161-
*/
162-
@Contract("_, _, _, _ -> new")
163-
public @NotNull PaginatedMenu createPaginated(@NonNull String title, int rows, int pageSize, boolean colorize) {
164-
checkRows(rows);
165-
return new PaginatedMenu(rows, pageSize, title, EnumSet.noneOf(Modifier.class), colorize);
166-
}
167-
168-
/**
169-
* Create a new regular Menu with the provided title and rows with the option to colorize it
170-
* <p>
171-
* This also creates a simple hash set of modifiers which by default is empty.
172-
* <p>
173-
* A good example of creation using a method like this:
174-
* <pre>{@code
175-
* var plugin = ...;
176-
* Menu menu = Menus.getFactory().createPaginated("Title", 3, ..., true, EnumSet.of(Modifier.PREVENT_ITEM_REMOVAL));
177-
* }</pre>
178-
* @param title the title to name the menu
179-
* @param rows the rows to add to the menu
180-
* @param modifiers a hashset of pre-defined modifiers
181-
* @param colorize colorize the title or not.
182-
* @return a new Menu with the provided rows and title.
183-
*/
184-
@Contract("_, _, _, _, _ -> new;")
185-
public @NotNull Menu createPaginated(@NonNull String title, int rows, int pageSize, boolean colorize, EnumSet<Modifier> modifiers) {
186-
checkRows(rows);
187-
return new Menu(rows, title, modifiers, colorize);
188-
}
189-
190-
/**
191-
* Create a new regular Menu with the provided title and rows with the option to colorize it
192-
* <p>
193-
* This also creates a simple hash set of modifiers which by default is empty.
194-
* <p>
195-
* A good example of creation using a method like this:
196-
* <pre>{@code
197-
* var plugin = ...;
198-
* Menu menu = Menus.getFactory().createPaginated("Title", 3, ..., EnumSet.of(Modifier.PREVENT_ITEM_REMOVAL));
199-
* }</pre>
200-
* @param title the title to name the menu
201-
* @param rows the rows to add to the menu
202-
* @param modifiers a hashset of pre-defined modifiers
203-
* @return a new Menu with the provided rows and title.
204-
*/
205-
@Contract("_, _, _, _ -> new;")
206-
public @NotNull PaginatedMenu createPaginated(@NonNull String title, int rows, int pageSize, EnumSet<Modifier> modifiers) {
207-
checkRows(rows);
208-
return new PaginatedMenu(rows, pageSize, title, modifiers, true);
209-
}
210-
211108
private void checkRows(int rows) {
212109
if (rows <= 0) throw new IllegalArgumentException("Rows must be greater than 0");
213110
else if (rows > 6) throw new IllegalArgumentException("Rows must be equal to 6 or less");

0 commit comments

Comments
 (0)