1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-12-01 15:03:36 +01:00

New placeholder for int type exp output %jobsr_user_jexp_int_[name]%

This commit is contained in:
Zrips 2024-08-20 17:29:27 +03:00
parent 80aad6ea49
commit 458775eb6f

View File

@ -416,6 +416,7 @@ public class Placeholder {
DecimalFormat dFormat = new DecimalFormat("00.0"); DecimalFormat dFormat = new DecimalFormat("00.0");
DecimalFormat fFormat = new DecimalFormat("##.###"); DecimalFormat fFormat = new DecimalFormat("##.###");
NumberFormat format = NumberFormat.getInstance(Locale.ENGLISH);
public String getValue(UUID uuid, JobsPlaceHolders placeHolder, String value) { public String getValue(UUID uuid, JobsPlaceHolders placeHolder, String value) {
if (placeHolder == null) if (placeHolder == null)
@ -424,8 +425,6 @@ public class Placeholder {
JobsPlayer user = uuid == null ? null : Jobs.getPlayerManager().getJobsPlayer(uuid); JobsPlayer user = uuid == null ? null : Jobs.getPlayerManager().getJobsPlayer(uuid);
// Placeholders by JobsPlayer object // Placeholders by JobsPlayer object
if (user != null) { if (user != null) {
NumberFormat format = NumberFormat.getInstance(Locale.ENGLISH);
switch (placeHolder) { switch (placeHolder) {
case user_dailyquests_pending: case user_dailyquests_pending:
Integer pendingQuests = (int) user.getQuestProgressions().stream().filter(q -> !q.isCompleted()).count(); Integer pendingQuests = (int) user.getQuestProgressions().stream().filter(q -> !q.isCompleted()).count();