mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-26 12:35:28 +01:00
Fix for gtop incorrect listing numbers
This commit is contained in:
parent
874fd3ce5c
commit
9adcc1593e
@ -1362,15 +1362,12 @@ public enum CMIMaterial {
|
||||
if (id == null)
|
||||
return CMIMaterial.NONE;
|
||||
|
||||
Integer data = null;
|
||||
Integer ids = null;
|
||||
|
||||
id = id.replaceAll("_| |minecraft:", "").toLowerCase();
|
||||
|
||||
if (id.contains(":")) {
|
||||
try {
|
||||
ids = Integer.parseInt(id.split(":")[0]);
|
||||
data = Integer.parseInt(id.split(":")[1]);
|
||||
Integer ids = Integer.parseInt(id.split(":")[0]);
|
||||
Integer data = Integer.parseInt(id.split(":")[1]);
|
||||
if (ids <= 0)
|
||||
return CMIMaterial.NONE;
|
||||
return get(ids, data);
|
||||
@ -1378,7 +1375,7 @@ public enum CMIMaterial {
|
||||
}
|
||||
|
||||
try {
|
||||
data = Integer.parseInt(id.split(":")[1]);
|
||||
Integer data = Integer.parseInt(id.split(":")[1]);
|
||||
id = id.split(":")[0];
|
||||
CMIMaterial mat = ItemManager.byName.get(id + ":" + data);
|
||||
if (mat != null) {
|
||||
@ -2539,8 +2536,8 @@ public enum CMIMaterial {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static CMISlabType getSlabType(Block block) {
|
||||
@SuppressWarnings("deprecation")
|
||||
public static CMISlabType getSlabType(Block block) {
|
||||
if (!isSlab(block.getType()))
|
||||
return CMISlabType.NOTSLAB;
|
||||
|
||||
@ -2597,8 +2594,8 @@ public enum CMIMaterial {
|
||||
default:
|
||||
return CMISlabType.DOUBLE;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ public class gtop implements Cmd {
|
||||
int amount = Jobs.getGCManager().JobsTopAmount;
|
||||
PageInfo pi = new PageInfo(amount, Jobs.getPlayerManager().getPlayersCache().size(), page);
|
||||
|
||||
List<TopList> FullList = Jobs.getJobsDAO().getGlobalTopList(pi.getStart() - 1);
|
||||
List<TopList> FullList = Jobs.getJobsDAO().getGlobalTopList(pi.getStart());
|
||||
if (FullList.isEmpty()) {
|
||||
sender.sendMessage(Jobs.getLanguage().getMessage("command.gtop.error.nojob"));
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user