1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-29 22:13:25 +01:00

Fix when the user job placeholder not work

This commit is contained in:
montlikadani 2020-02-15 17:25:23 +01:00
parent 368417d59e
commit 6c06ba6191
2 changed files with 5 additions and 5 deletions

View File

@ -53,7 +53,7 @@ public class Placeholder {
user_jexpunf_$1("jname/number"),
user_jmaxexpunf_$1("jname/number"),
user_jmaxlvl_$1("jname/number"),
user_job$1("jname/number"),
user_job_$1("jname/number"),
maxjobs,
@ -448,9 +448,10 @@ public class Placeholder {
vals = placeHolder.getComplexValues(value);
if (vals.isEmpty())
return "";
Job jobs = getJobFromValue(vals.get(0));
return jobs == null ? "" : convert(user.isInJob(jobs));
case user_job$1:
return jobs == null ? "no" : convert(user.isInJob(jobs));
case user_job_$1:
return j == null ? "none" : j.getJob().getName();
case maxjobs:

View File

@ -1160,14 +1160,13 @@ public class ConfigManager {
break;
default:
break;
}
if (actionType == ActionType.STRIPLOGS && Version.isCurrentLower(Version.v1_13_R1))
continue;
if (material != null && material.getMaterial() != null && material.getMaterial() == Material.AIR) {
log.warning("Job " + jobKey + " " + actionType.getName() + " cant recognize material! (" + key +")");
log.warning("Job " + jobKey + " " + actionType.getName() + " cant recognize material! (" + key + ")");
continue;
}