Removed deprecated in comment

This commit is contained in:
boy0001 2015-08-07 13:18:14 +10:00
parent d779ca366d
commit 444e8b346e
3 changed files with 7 additions and 2 deletions

View File

@ -60,7 +60,6 @@ import com.plotsquared.bukkit.util.BukkitUtil;
* @author Empire92 * @author Empire92
* @version API 2.0 * @version API 2.0
* *
* @deprecated
*/ */
@SuppressWarnings("unused") public class PlotAPI { @SuppressWarnings("unused") public class PlotAPI {

View File

@ -32,7 +32,7 @@ public class HelpMenu {
} }
public HelpMenu generateMaxPages() { public HelpMenu generateMaxPages() {
this._maxPage = Math.max((_commands.size() - 1) / PER_PAGE, 1); this._maxPage = Math.max((_commands.size() - 1) / PER_PAGE, 0);
return this; return this;
} }
@ -40,6 +40,9 @@ public class HelpMenu {
if (currentPage > _maxPage) { if (currentPage > _maxPage) {
currentPage = _maxPage; currentPage = _maxPage;
} }
if (currentPage < 0) {
currentPage = 0;
}
_page = new HelpPage(_commandCategory, currentPage, _maxPage); _page = new HelpPage(_commandCategory, currentPage, _maxPage);
int max = Math.min((currentPage * PER_PAGE) + (PER_PAGE - 1), _commands.size()); int max = Math.min((currentPage * PER_PAGE) + (PER_PAGE - 1), _commands.size());
for (int i = currentPage * PER_PAGE; i < max; i++) { for (int i = currentPage * PER_PAGE; i < max; i++) {

View File

@ -140,6 +140,9 @@ public abstract class Command<E extends CommandCaller> extends CommandManager {
} }
final public CommandCategory getCategory() { final public CommandCategory getCategory() {
if (category == null) {
return CommandCategory.DEBUG;
}
return this.category; return this.category;
} }