1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-04 23:37:49 +01:00

Dont show help page when failing to find top and gtop results

This commit is contained in:
Zrips 2018-01-21 14:22:46 +02:00
parent 54650a2385
commit 4d15d26b73
3 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,7 @@ public class gtop implements Cmd {
List<TopList> FullList = Jobs.getJobsDAO().getGlobalTopList(st); List<TopList> FullList = Jobs.getJobsDAO().getGlobalTopList(st);
if (FullList.size() <= 0) { if (FullList.size() <= 0) {
sender.sendMessage(ChatColor.RED + Jobs.getLanguage().getMessage("command.gtop.error.nojob")); sender.sendMessage(ChatColor.RED + Jobs.getLanguage().getMessage("command.gtop.error.nojob"));
return false; return true;
} }
if (!Jobs.getGCManager().ShowToplistInScoreboard) { if (!Jobs.getGCManager().ShowToplistInScoreboard) {

View File

@ -62,7 +62,7 @@ public class top implements Cmd {
List<TopList> FullList = Jobs.getJobsDAO().toplist(args[0], st); List<TopList> FullList = Jobs.getJobsDAO().toplist(args[0], st);
if (FullList.size() <= 0) { if (FullList.size() <= 0) {
player.sendMessage(ChatColor.RED + Jobs.getLanguage().getMessage("general.error.noinfo")); player.sendMessage(ChatColor.RED + Jobs.getLanguage().getMessage("general.error.noinfo"));
return false; return true;
} }
Job job = Jobs.getJob(args[0]); Job job = Jobs.getJob(args[0]);

View File

@ -303,14 +303,14 @@ public class ShopManager {
ItemMeta meta = Item.getItemMeta(); ItemMeta meta = Item.getItemMeta();
int pervSlot = getPrevButtonSlot(GuiSize, page); int pervSlot = getPrevButtonSlot(GuiSize, page);
if (pervSlot != -1) { if (pervSlot != -1) {
meta.setDisplayName(Jobs.getLanguage().getMessage("command.help.output.prev")); meta.setDisplayName(Jobs.getLanguage().getMessage("command.help.output.prevPage"));
Item.setItemMeta(meta); Item.setItemMeta(meta);
GuiInv.setItem(pervSlot, Item); GuiInv.setItem(pervSlot, Item);
} }
int nextSlot = getnextButtonSlot(GuiSize, page); int nextSlot = getnextButtonSlot(GuiSize, page);
if (nextSlot != -1) { if (nextSlot != -1) {
meta.setDisplayName(Jobs.getLanguage().getMessage("command.help.output.next")); meta.setDisplayName(Jobs.getLanguage().getMessage("command.help.output.nextPage"));
Item.setItemMeta(meta); Item.setItemMeta(meta);
GuiInv.setItem(nextSlot, Item); GuiInv.setItem(nextSlot, Item);
} }