Fixed error going back a page

This commit is contained in:
sekwah 2018-01-23 06:24:09 +00:00
parent cf1126f71d
commit 8021480bff

View File

@ -45,12 +45,12 @@ public class CommandWithSubCommands implements CommandTemplate {
if(args.length > 1) {
try {
helpPage = Integer.parseInt(args[1]);
if(helpPage < 0) {
helpPage = 1;
}
else if(helpPage > pages) {
if(helpPage > pages) {
helpPage = pages;
}
if(helpPage <= 0) {
helpPage = 1;
}
}
catch(NumberFormatException e) {
sender.sendMessage(Lang.translateInsertVariablesColor("command.help.invalidnum", args[1]));