mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-05 12:02:53 +00:00
Adds pagination bounds check Fixes #1509
This commit is contained in:
parent
87c6672212
commit
ef1e57f445
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue