mirror of
https://github.com/Zrips/Jobs.git
synced 2025-03-12 06:40:09 +01:00
Added 2 placeholders to show the original number of exp and the formatted (#659)
fix a discrepency between formatting of jexp and jmaxexp as well as adding unformatted versions for math
This commit is contained in:
parent
5ecc62d514
commit
cdb91e0cce
@ -50,6 +50,8 @@ public class Placeholder {
|
||||
user_jlevel_$1("jname/number"),
|
||||
user_jexp_$1("jname/number"),
|
||||
user_jmaxexp_$1("jname/number"),
|
||||
user_jexpunf_$1("jname/number"),
|
||||
user_jmaxexpunf_$1("jname/number"),
|
||||
user_jmaxlvl_$1("jname/number"),
|
||||
user_job$1("jname/number"),
|
||||
|
||||
@ -410,6 +412,7 @@ public class Placeholder {
|
||||
|
||||
if (placeHolder.isComplex()) {
|
||||
List<String> vals = placeHolder.getComplexValues(value);
|
||||
NumberFormat format = NumberFormat.getInstance(Locale.ENGLISH);
|
||||
if (vals.isEmpty())
|
||||
return "";
|
||||
JobProgression j = getProgFromValue(user, vals.get(0));
|
||||
@ -426,9 +429,12 @@ public class Placeholder {
|
||||
case user_jlevel_$1:
|
||||
return j == null ? "" : Integer.toString(j.getLevel());
|
||||
case user_jexp_$1:
|
||||
NumberFormat format = NumberFormat.getInstance(Locale.ENGLISH);
|
||||
return j == null ? "" : format.format(j.getExperience());
|
||||
case user_jmaxexp_$1:
|
||||
return j == null ? "" : format.format(j.getMaxExperience());
|
||||
case user_jexpunf_$1:
|
||||
return j == null ? "" : Integer.toString(j.getExperience());
|
||||
case user_jmaxexpunf_$1:
|
||||
return j == null ? "" : Integer.toString(j.getMaxExperience());
|
||||
case user_jmaxlvl_$1:
|
||||
return j == null ? "" : Integer.toString(j.getJob().getMaxLevel(user));
|
||||
|
Loading…
Reference in New Issue
Block a user