diff --git a/pom.xml b/pom.xml
index 1fdc89ce..05aa2498 100644
--- a/pom.xml
+++ b/pom.xml
@@ -18,7 +18,7 @@
org.spigotmc
spigot-api
- 1.16.1-R0.1-SNAPSHOT
+ 1.16.2-R0.1-SNAPSHOT
provided
@@ -33,7 +33,7 @@
de.keyle
mypet
- 3.9
+ 3.10
provided
@@ -156,7 +156,7 @@
me.clip
placeholderapi
- 2.10.8
+ 2.10.9
provided
diff --git a/src/main/java/com/gamingmesh/jobs/PermissionManager.java b/src/main/java/com/gamingmesh/jobs/PermissionManager.java
index 891760e0..34872654 100644
--- a/src/main/java/com/gamingmesh/jobs/PermissionManager.java
+++ b/src/main/java/com/gamingmesh/jobs/PermissionManager.java
@@ -20,7 +20,6 @@ package com.gamingmesh.jobs;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
-import java.util.Map.Entry;
import org.bukkit.Bukkit;
import org.bukkit.World;
@@ -140,11 +139,11 @@ public class PermissionManager {
}
Double amount = 0D;
- for (Entry uno : permissions.entrySet()) {
- if (uno.getKey().startsWith(perm)) {
+ for (String uno : permissions.keySet()) {
+ if (uno.startsWith(perm)) {
double t = 0d;
try {
- t = Double.parseDouble(uno.getKey().replace(perm, ""));
+ t = Double.parseDouble(uno.replace(perm, ""));
} catch (NumberFormatException e) {
}
diff --git a/src/main/java/com/gamingmesh/jobs/Placeholders/Placeholder.java b/src/main/java/com/gamingmesh/jobs/Placeholders/Placeholder.java
index daf535e4..b5e83ea4 100644
--- a/src/main/java/com/gamingmesh/jobs/Placeholders/Placeholder.java
+++ b/src/main/java/com/gamingmesh/jobs/Placeholders/Placeholder.java
@@ -519,11 +519,6 @@ public class Placeholder {
return "";
Title title = Jobs.gettitleManager().getTitle(j.getLevel(), j.getJob().getName());
return title == null ? "" : title.getChatColor() + title.getName();
-
- case maxjobs:
- Double max = Jobs.getPermissionManager().getMaxPermission(user, "jobs.max");
- max = max == 0D ? Jobs.getGCManager().getMaxJobs() : max;
- return Double.toString(max);
default:
break;
}
@@ -533,10 +528,9 @@ public class Placeholder {
if (user.isOnline()) {
Player player = user.getPlayer();
if (player != null) {
- List values;
switch (placeHolder) {
case user_canjoin_$1:
- values = placeHolder.getComplexValues(value);
+ List values = placeHolder.getComplexValues(value);
if (values.isEmpty())
return "";
@@ -560,6 +554,11 @@ public class Placeholder {
return convert(true);
+ case maxjobs:
+ int max = Jobs.getPermissionManager().getMaxPermission(user, "jobs.max").intValue();
+ max = max == 0 ? Jobs.getGCManager().getMaxJobs() : max;
+ return Integer.toString(max);
+
default:
break;
}