mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-01-07 15:48:43 +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);
|
||||
if (page > pages) {
|
||||
sender.sendMessage(tl("infoUnknownChapter"));
|
||||
return;
|
||||
}
|
||||
if (!onePage && commandName != null) {
|
||||
|
||||
StringBuilder content = new StringBuilder();
|
||||
|
|
Loading…
Reference in a new issue