Skip to content

Commit 4015877

Browse files
implement Decorator
1 parent b7953ce commit 4015877

File tree

1 file changed

+3
-32
lines changed

1 file changed

+3
-32
lines changed

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

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66
import me.flame.menus.menu.fillers.MenuFiller;
77

88
import org.bukkit.Material;
9+
import org.bukkit.entity.*;
910
import org.bukkit.inventory.ItemStack;
1011
import org.jetbrains.annotations.Contract;
1112
import org.jetbrains.annotations.NotNull;
1213

1314
@SuppressWarnings("unused")
14-
public final class PageDecoration {
15+
public final class PageDecoration implements Decorator {
1516
@NotNull
1617
private final PaginatedMenu menu;
1718

@@ -25,11 +26,6 @@ public static PageDecoration create(PaginatedMenu menu) {
2526
return new PageDecoration(menu);
2627
}
2728

28-
/**
29-
* Fills the borders of the pages with a given item stack.
30-
*
31-
* @param itemStack the item stack to fill the pages with
32-
*/
3329
public void fillPageBorders(ItemStack itemStack) {
3430
int size = menu.size;
3531
for (Page page : menu.pageList) {
@@ -39,11 +35,6 @@ public void fillPageBorders(ItemStack itemStack) {
3935
}
4036
}
4137

42-
/**
43-
* Fills the borders of the pages with a given item stack.
44-
*
45-
* @param borderMaterial the item stack to fill the pages with
46-
*/
4738
public void fillPageBorders(Material borderMaterial) {
4839
ItemStack itemStack = new ItemStack(borderMaterial);
4940
int size = menu.size;
@@ -54,11 +45,6 @@ public void fillPageBorders(Material borderMaterial) {
5445
}
5546
}
5647

57-
/**
58-
* Fills the borders of the pages with a given item stack.
59-
*
60-
* @param item the item stack to fill the pages with
61-
*/
6248
public void fillPageBorders(MenuItem item) {
6349
int size = menu.size;
6450
for (Page page : menu.pageList) {
@@ -68,11 +54,6 @@ public void fillPageBorders(MenuItem item) {
6854
}
6955
}
7056

71-
/**
72-
* Fills the pages of a menu with a given item stack.
73-
*
74-
* @param borderMaterial the item stack to fill the pages with
75-
*/
7657
public void fillPages(Material borderMaterial) {
7758
ItemStack item = new ItemStack(borderMaterial);
7859
int size = menu.size;
@@ -86,11 +67,6 @@ public void fillPages(Material borderMaterial) {
8667
}
8768
}
8869

89-
/**
90-
* Fills the pages of a menu with a given item stack.
91-
*
92-
* @param menuItem the item stack to fill the pages with
93-
*/
9470
public void fillPages(@NotNull MenuItem menuItem) {
9571
int size = menu.size;
9672
for (Page page : menu.pageList) {
@@ -103,11 +79,6 @@ public void fillPages(@NotNull MenuItem menuItem) {
10379
}
10480
}
10581

106-
/**
107-
* Fills the pages of a menu with a given item stack.
108-
*
109-
* @param itemStack the item stack to fill the pages with
110-
*/
11182
public void fillPages(ItemStack itemStack) {
11283
int size = menu.size;
11384
for (Page page : menu.pageList) {
@@ -119,4 +90,4 @@ public void fillPages(ItemStack itemStack) {
11990
}
12091
}
12192
}
122-
}
93+
}

0 commit comments

Comments
 (0)