From 4d15d26b735703bdea0e77e3c6d898c2d692eeee Mon Sep 17 00:00:00 2001 From: Zrips Date: Sun, 21 Jan 2018 14:22:46 +0200 Subject: [PATCH] Dont show help page when failing to find top and gtop results --- src/main/java/com/gamingmesh/jobs/commands/list/gtop.java | 2 +- src/main/java/com/gamingmesh/jobs/commands/list/top.java | 2 +- src/main/java/com/gamingmesh/jobs/config/ShopManager.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/gtop.java b/src/main/java/com/gamingmesh/jobs/commands/list/gtop.java index dc6bf2f1..9d867784 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/gtop.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/gtop.java @@ -54,7 +54,7 @@ public class gtop implements Cmd { List FullList = Jobs.getJobsDAO().getGlobalTopList(st); if (FullList.size() <= 0) { sender.sendMessage(ChatColor.RED + Jobs.getLanguage().getMessage("command.gtop.error.nojob")); - return false; + return true; } if (!Jobs.getGCManager().ShowToplistInScoreboard) { diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/top.java b/src/main/java/com/gamingmesh/jobs/commands/list/top.java index edac00a6..103cdc38 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/top.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/top.java @@ -62,7 +62,7 @@ public class top implements Cmd { List FullList = Jobs.getJobsDAO().toplist(args[0], st); if (FullList.size() <= 0) { player.sendMessage(ChatColor.RED + Jobs.getLanguage().getMessage("general.error.noinfo")); - return false; + return true; } Job job = Jobs.getJob(args[0]); diff --git a/src/main/java/com/gamingmesh/jobs/config/ShopManager.java b/src/main/java/com/gamingmesh/jobs/config/ShopManager.java index 456de793..f7240b58 100644 --- a/src/main/java/com/gamingmesh/jobs/config/ShopManager.java +++ b/src/main/java/com/gamingmesh/jobs/config/ShopManager.java @@ -303,14 +303,14 @@ public class ShopManager { ItemMeta meta = Item.getItemMeta(); int pervSlot = getPrevButtonSlot(GuiSize, page); if (pervSlot != -1) { - meta.setDisplayName(Jobs.getLanguage().getMessage("command.help.output.prev")); + meta.setDisplayName(Jobs.getLanguage().getMessage("command.help.output.prevPage")); Item.setItemMeta(meta); GuiInv.setItem(pervSlot, Item); } int nextSlot = getnextButtonSlot(GuiSize, page); if (nextSlot != -1) { - meta.setDisplayName(Jobs.getLanguage().getMessage("command.help.output.next")); + meta.setDisplayName(Jobs.getLanguage().getMessage("command.help.output.nextPage")); Item.setItemMeta(meta); GuiInv.setItem(nextSlot, Item); }