mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-03 23:08:07 +01:00
Wrong top list start point
This commit is contained in:
parent
4f634c900f
commit
a88e733851
@ -49,7 +49,9 @@ public class gtop implements Cmd {
|
|||||||
if (page < 1)
|
if (page < 1)
|
||||||
page = 1;
|
page = 1;
|
||||||
|
|
||||||
List<TopList> FullList = Jobs.getJobsDAO().getGlobalTopList(page * 15 - 15);
|
int st = (page * 15) - 15;
|
||||||
|
|
||||||
|
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 false;
|
||||||
@ -57,7 +59,7 @@ public class gtop implements Cmd {
|
|||||||
|
|
||||||
if (!Jobs.getGCManager().ShowToplistInScoreboard) {
|
if (!Jobs.getGCManager().ShowToplistInScoreboard) {
|
||||||
sender.sendMessage(Jobs.getLanguage().getMessage("command.gtop.output.topline"));
|
sender.sendMessage(Jobs.getLanguage().getMessage("command.gtop.output.topline"));
|
||||||
int i = page * 15 - 15;
|
int i = st;
|
||||||
for (TopList One : FullList) {
|
for (TopList One : FullList) {
|
||||||
i++;
|
i++;
|
||||||
String PlayerName = One.getPlayerName() != null ? One.getPlayerName() : "Unknown";
|
String PlayerName = One.getPlayerName() != null ? One.getPlayerName() : "Unknown";
|
||||||
@ -68,7 +70,7 @@ public class gtop implements Cmd {
|
|||||||
|
|
||||||
List<String> ls = new ArrayList<String>();
|
List<String> ls = new ArrayList<String>();
|
||||||
|
|
||||||
int i = page * 15 - 15;
|
int i = st;
|
||||||
for (TopList one : FullList) {
|
for (TopList one : FullList) {
|
||||||
i++;
|
i++;
|
||||||
String playername = one.getPlayerName() != null ? one.getPlayerName() : "Unknown";
|
String playername = one.getPlayerName() != null ? one.getPlayerName() : "Unknown";
|
||||||
|
@ -57,8 +57,9 @@ public class top implements Cmd {
|
|||||||
player.sendMessage(ChatColor.RED + Jobs.getLanguage().getMessage("command.top.error.nojob"));
|
player.sendMessage(ChatColor.RED + Jobs.getLanguage().getMessage("command.top.error.nojob"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
int st = (page * 15) - 15;
|
||||||
|
|
||||||
List<TopList> FullList = Jobs.getJobsDAO().toplist(args[0], page * 15);
|
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 false;
|
||||||
@ -71,7 +72,7 @@ public class top implements Cmd {
|
|||||||
|
|
||||||
if (!Jobs.getGCManager().ShowToplistInScoreboard) {
|
if (!Jobs.getGCManager().ShowToplistInScoreboard) {
|
||||||
player.sendMessage(Jobs.getLanguage().getMessage("command.top.output.topline", "%jobname%", jobName));
|
player.sendMessage(Jobs.getLanguage().getMessage("command.top.output.topline", "%jobname%", jobName));
|
||||||
int i = (page * 15) - 15;
|
int i = st;
|
||||||
for (TopList One : FullList) {
|
for (TopList One : FullList) {
|
||||||
i++;
|
i++;
|
||||||
String PlayerName = One.getPlayerName() != null ? One.getPlayerName() : "Unknown";
|
String PlayerName = One.getPlayerName() != null ? One.getPlayerName() : "Unknown";
|
||||||
@ -83,7 +84,7 @@ public class top implements Cmd {
|
|||||||
|
|
||||||
List<String> ls = new ArrayList<String>();
|
List<String> ls = new ArrayList<String>();
|
||||||
|
|
||||||
int i = (page * 15) - 15;
|
int i = st;
|
||||||
for (TopList one : FullList) {
|
for (TopList one : FullList) {
|
||||||
i++;
|
i++;
|
||||||
String playername = one.getPlayerName() != null ? one.getPlayerName() : "Unknown";
|
String playername = one.getPlayerName() != null ? one.getPlayerName() : "Unknown";
|
||||||
|
Loading…
Reference in New Issue
Block a user