mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 05:55:27 +01:00
Merge pull request #1795 from Nikkcom/master
Solves issue #1772. Added 3 new placeholders.
This commit is contained in:
commit
79bda9176b
@ -91,8 +91,11 @@ public class Placeholder {
|
||||
user_archived_jobs_exp_$1("jname/number"),
|
||||
|
||||
jtop_name_$1_$2("jname/number", "[1-15]"),
|
||||
jtop_name_total_$1("[1-15]"),
|
||||
jtop_displayname_$1_$2("jname/number", "[1-15]"),
|
||||
jtop_displayname_total_$1("[1-15]"),
|
||||
jtop_level_$1_$2("jname/number", "[1-15]"),
|
||||
jtop_level_total_$1("[1-15]"),
|
||||
|
||||
maxjobs,
|
||||
total_workers,
|
||||
@ -631,6 +634,26 @@ public class Placeholder {
|
||||
|
||||
List<TopList> list = Jobs.getJobsDAO().getTopListByJob(jo, 15);
|
||||
|
||||
if (list.size() < place)
|
||||
return "";
|
||||
|
||||
return list.get(place - 1).getPlayerInfo().getName();
|
||||
case jtop_name_total_$1:
|
||||
if (values.isEmpty())
|
||||
return "";
|
||||
|
||||
place = 0;
|
||||
try {
|
||||
place = Integer.parseInt(values.get(0));
|
||||
} catch (NumberFormatException e) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (place < 1)
|
||||
return "";
|
||||
|
||||
list = Jobs.getJobsDAO().getGlobalTopList();
|
||||
|
||||
if (list.size() < place)
|
||||
return "";
|
||||
|
||||
@ -651,6 +674,26 @@ public class Placeholder {
|
||||
|
||||
list = Jobs.getJobsDAO().getTopListByJob(jo, 15);
|
||||
|
||||
if (list.size() < place)
|
||||
return "";
|
||||
|
||||
return list.get(place - 1).getPlayerInfo().getDisplayName();
|
||||
case jtop_displayname_total_$1:
|
||||
if (values.isEmpty())
|
||||
return "";
|
||||
|
||||
place = 0;
|
||||
try {
|
||||
place = Integer.parseInt(values.get(0));
|
||||
} catch (NumberFormatException e) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (place < 1)
|
||||
return "";
|
||||
|
||||
list = Jobs.getJobsDAO().getGlobalTopList();
|
||||
|
||||
if (list.size() < place)
|
||||
return "";
|
||||
|
||||
@ -675,6 +718,26 @@ public class Placeholder {
|
||||
return "";
|
||||
|
||||
return String.valueOf(list.get(place - 1).getLevel());
|
||||
case jtop_level_total_$1:
|
||||
if (values.isEmpty())
|
||||
return "";
|
||||
|
||||
place = 0;
|
||||
try {
|
||||
place = Integer.parseInt(values.get(0));
|
||||
} catch (NumberFormatException e) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (place < 1)
|
||||
return "";
|
||||
|
||||
list = Jobs.getJobsDAO().getGlobalTopList();
|
||||
|
||||
if (list.size() < place)
|
||||
return "";
|
||||
|
||||
return String.valueOf(list.get(place - 1).getPlayerInfo().getJobsPlayer().getTotalLevels());
|
||||
case name_$1:
|
||||
return jo.getName();
|
||||
case shortname_$1:
|
||||
|
Loading…
Reference in New Issue
Block a user