mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-03-09 13:19:13 +01:00
Adds pagination bounds check Fixes #1509
This commit is contained in:
parent
87c6672212
commit
ef1e57f445
@ -70,6 +70,10 @@ public class TextPager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int pages = end / 9 + (end % 9 > 0 ? 1 : 0);
|
int pages = end / 9 + (end % 9 > 0 ? 1 : 0);
|
||||||
|
if (page > pages) {
|
||||||
|
sender.sendMessage(tl("infoUnknownChapter"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!onePage && commandName != null) {
|
if (!onePage && commandName != null) {
|
||||||
|
|
||||||
StringBuilder content = new StringBuilder();
|
StringBuilder content = new StringBuilder();
|
||||||
|
Loading…
Reference in New Issue
Block a user