1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-07 00:38:42 +01:00

Fix archived placeholders not worked with job name context

Fixes #1060
This commit is contained in:
montlikadani 2021-01-16 12:38:58 +01:00
parent 77295b6041
commit da5641ff37

View File

@ -72,8 +72,8 @@ public class Placeholder {
user_jmaxlvl_$1("jname/number"), user_jmaxlvl_$1("jname/number"),
user_job_$1("jname/number"), user_job_$1("jname/number"),
user_title_$1("jname/number"), user_title_$1("jname/number"),
user_archived_jobs_level("jname/number"), user_archived_jobs_level_$1("jname/number"),
user_archived_jobs_exp("jname/number"), user_archived_jobs_exp_$1("jname/number"),
maxjobs, maxjobs,
@ -543,14 +543,14 @@ public class Placeholder {
return ""; return "";
Title title = Jobs.gettitleManager().getTitle(j.getLevel(), j.getJob().getName()); Title title = Jobs.gettitleManager().getTitle(j.getLevel(), j.getJob().getName());
return title == null ? "" : title.getChatColor() + title.getName(); return title == null ? "" : title.getChatColor() + title.getName();
case user_archived_jobs_level: case user_archived_jobs_level_$1:
if (j == null) { if (j == null) {
return ""; return "";
} }
JobProgression archivedJobProg = user.getArchivedJobProgression(j.getJob()); JobProgression archivedJobProg = user.getArchivedJobProgression(j.getJob());
return archivedJobProg == null ? "" : Integer.toString(archivedJobProg.getLevel()); return archivedJobProg == null ? "" : Integer.toString(archivedJobProg.getLevel());
case user_archived_jobs_exp: case user_archived_jobs_exp_$1:
if (j == null) { if (j == null) {
return ""; return "";
} }