Skip to content

Commit 047cfd8

Browse files
committed
4.2.1
1 parent c8ea8e7 commit 047cfd8

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SimpAPI v4.2.0
1+
# SimpAPI v4.2.1
22
****
33
SimpAPI, finally a good API that can make coding MC Plugins much easier and less painful.
44
This API includes all of my primary utilities like *Menu Manager*, *Command Manager*, *ColorTranslator*, and more.
@@ -25,7 +25,7 @@ JavaDocs: https://kodysimpson.github.io/SimpAPI/index.html
2525
<dependency>
2626
<groupId>com.github.KodySimpson</groupId>
2727
<artifactId>SimpAPI</artifactId>
28-
<version>4.2.0</version>
28+
<version>4.2.1</version>
2929
</dependency>
3030
```
3131

@@ -51,7 +51,7 @@ repositories {
5151
Groovy/Kotlin:
5252
```groovy
5353
dependencies {
54-
implementation 'com.github.KodySimpson:SimpAPI:4.2.0'
54+
implementation 'com.github.KodySimpson:SimpAPI:4.2.1'
5555
}
5656
```
5757

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>me.kodysimpson</groupId>
88
<artifactId>SimpAPI</artifactId>
9-
<version>4.1.9</version>
9+
<version>4.2.1</version>
1010
<packaging>jar</packaging>
1111

1212
<name>SimpAPI</name>

src/main/java/me/kodysimpson/simpapi/menu/Menu.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,18 @@ public void back() throws MenuManagerException, MenuManagerNotSetupException {
6666
MenuManager.openMenu(playerMenuUtility.lastMenu().getClass(), playerMenuUtility.getOwner());
6767
}
6868

69-
protected void reload() {
69+
protected void reloadItems() {
7070
for (int i = 0; i < inventory.getSize(); i++){
7171
inventory.setItem(i, null);
7272
}
7373
setMenuItems();
7474
}
7575

76+
protected void reload() throws MenuManagerException, MenuManagerNotSetupException {
77+
p.closeInventory();
78+
MenuManager.openMenu(this.getClass(), p);
79+
}
80+
7681
//Overridden method from the InventoryHolder interface
7782
@Override
7883
public @NotNull Inventory getInventory() {

src/main/java/me/kodysimpson/simpapi/menu/PaginatedMenu.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public boolean prevPage(){
110110
return false;
111111
}else{
112112
page = page - 1;
113-
reload();
113+
reloadItems();
114114
return true;
115115
}
116116
}
@@ -121,7 +121,7 @@ public boolean prevPage(){
121121
public boolean nextPage(){
122122
if (!((index + 1) >= getData().size())) {
123123
page = page + 1;
124-
reload();
124+
reloadItems();
125125
return true;
126126
} else {
127127
return false;

0 commit comments

Comments
 (0)