File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
src/main/java/me/flame/menus/menu Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 10
10
import java .util .EnumSet ;
11
11
import java .util .function .Consumer ;
12
12
13
+ //changed
14
+
13
15
@ SuppressWarnings ("unused" )
14
16
public abstract class BaseBuilder <G , B extends BaseBuilder <G , B >> {
15
17
protected String title ;
16
18
protected int rows ;
19
+ protected MenuType type = MenuType .CHEST ;
17
20
protected final EnumSet <Modifier > modifiers ;
18
21
protected Consumer <G > menuConsumer ;
19
22
@@ -34,6 +37,11 @@ public B rows(int rows) {
34
37
return (B ) this ;
35
38
}
36
39
40
+ public B type (MenuType type ) {
41
+ this .type = type ;
42
+ return (B ) this ;
43
+ }
44
+
37
45
public B addModifier (@ NonNull Modifier modifier ) {
38
46
modifiers .add (modifier );
39
47
return (B ) this ;
@@ -57,6 +65,8 @@ public void setMenuConsumer(@NonNull Consumer<G> menuConsumer) {
57
65
this .menuConsumer = menuConsumer ;
58
66
}
59
67
68
+ public abstract G create ();
69
+
60
70
protected void checkRows (int rows ) {
61
71
if (rows <= 0 ) throw new IllegalArgumentException ("Rows must be greater than 0" );
62
72
if (rows > 6 ) throw new IllegalArgumentException ("Rows must be equal to 6 or less" );
You can’t perform that action at this time.
0 commit comments