mirror of
https://github.com/CarmJos/UserPrefix.git
synced 2024-09-19 20:15:47 +00:00
[v2.3.1] [F] 修复前缀数量超过一页时翻页可能出现错误的问题
This commit is contained in:
parent
548f1d366f
commit
d752461c74
2
pom.xml
2
pom.xml
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<groupId>cc.carm.plugin</groupId>
|
<groupId>cc.carm.plugin</groupId>
|
||||||
<artifactId>userprefix</artifactId>
|
<artifactId>userprefix</artifactId>
|
||||||
<version>2.3.0</version>
|
<version>2.3.1</version>
|
||||||
|
|
||||||
<name>UserPrefix</name>
|
<name>UserPrefix</name>
|
||||||
<description>轻便、高效、实时的用户前缀系统。</description>
|
<description>轻便、高效、实时的用户前缀系统。</description>
|
||||||
|
@ -49,7 +49,7 @@ public class AutoPagedGUI extends CommonPagedGUI {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void openGUI(Player user) {
|
public void openGUI(Player user) {
|
||||||
if (previousPageSlot >= 0)
|
if (previousPageSlot >= 0) {
|
||||||
if (hasPreviousPage()) {
|
if (hasPreviousPage()) {
|
||||||
setItem(previousPageSlot, new GUIItem(previousPageUI == null ? PluginConfig.GUI.Items.PREVIOUS_PAGE.get() : previousPageUI) {
|
setItem(previousPageSlot, new GUIItem(previousPageUI == null ? PluginConfig.GUI.Items.PREVIOUS_PAGE.get() : previousPageUI) {
|
||||||
@Override
|
@Override
|
||||||
@ -63,9 +63,12 @@ public class AutoPagedGUI extends CommonPagedGUI {
|
|||||||
openGUI(user);
|
openGUI(user);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
setItem(previousPageSlot, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nextPageSlot >= 0)
|
if (nextPageSlot >= 0) {
|
||||||
if (hasNextPage()) {
|
if (hasNextPage()) {
|
||||||
setItem(nextPageSlot, new GUIItem(nextPageUI == null ? PluginConfig.GUI.Items.NEXT_PAGE.get() : nextPageUI) {
|
setItem(nextPageSlot, new GUIItem(nextPageUI == null ? PluginConfig.GUI.Items.NEXT_PAGE.get() : nextPageUI) {
|
||||||
@Override
|
@Override
|
||||||
@ -79,6 +82,9 @@ public class AutoPagedGUI extends CommonPagedGUI {
|
|||||||
openGUI(user);
|
openGUI(user);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
setItem(nextPageSlot, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
super.openGUI(user);
|
super.openGUI(user);
|
||||||
|
Loading…
Reference in New Issue
Block a user